A team has a fixed amount of focused time B this sprint and a list of n candidate tasks. Task i costs cost[i] units of time (a positive integer). The team may complete any subset of tasks whose total time cost is at most B. The goal is to finish as MANY tasks as possible (their individual value is irrelevant — only the count matters).
Print the maximum number of tasks that can be completed within the budget.
Input format
Line 1: two integers n and B.
Line 2: n space-separated positive integers, the task time costs.
Output format
A single integer: the maximum number of tasks that fit within total time B.
Constraints
- 1 ≤ n ≤ 100000
- 0 ≤ B ≤ 1000000000
- 1 ≤ cost[i] ≤ 1000000