Problem11420--CF102951 - B. Studying Algorithms

11420: CF102951 - B. Studying Algorithms

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

Steph wants to improve her knowledge of algorithms over winter break. She has a total of $X\ (1≤X≤10^4)$ minutes to dedicate to learning algorithms.

There are $N\ (1≤N≤2\times 10^5)$ algorithms, and each one of them requires $a_i\ (1≤a_i≤100)$ minutes to learn. Find the maximum number of algorithms she can learn.

Input

Line 1: Two space-separated integers $N$ and $X$

Line 2: $N$ space-separated integers $a_1,a_2,…a_N$

Output

A single integer, the answer to the problem.

Sample 1 Input

6 15
4 3 8 4 7 3

Sample 1 Output

4

HINT

CF102951B.

Source/Category