It's Demo Day! There are
Constraints
Subtask 1 [1 point]
Subtask 2 [1 point]
No additional constraints.
Input Specification
The first line of input contains two integers
The second line contains
Output Specification
Output the maximum number of demos that can be shown.
Sample Input
Copy
3 5
3 2 1
Sample Output
Copy
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