It's Demo Day! There are demos but unfortunately there are only picoseconds allocated, so it might not be possible for every demo to be shown. Assuming that one demo can start precisely when another demo ends, what is the maximum number of demos that can be shown?
Constraints
Subtask 1 [1 point]
Subtask 2 [1 point]
No additional constraints.
Input Specification
The first line of input contains two integers and .
The second line contains integers, where represents the number of picoseconds needed for demo .
Output Specification
Output the maximum number of demos that can be shown.
Sample Input
3 5
3 2 1
Sample Output
2
Sample Explanation
We can show the first two demos. It is impossible to show all three demos, as that would take 6 picoseconds.
Comments