Amit is very fond of cookies, so he wants to buy some. 
There are N different cookies lying in front of him, with their prices, but he has only K Rs. 
He wants to maximize the number of cookies he buys with this money.

Now, you are Amit's best friend and have to help him buy as many cookies as possible.

Input Format

The first line contains two integers, N and K, followed by a line containing N space separated integers indicating the cookies' prices.

Output Format

An integer that denotes maximum number of cookies Amit can buy.

Constraints

1 ≤ N ≤ 10^5 

1 ≤ K ≤ 10^9 

1 ≤ price of any cookie ≤ 10^9 

There is only one cookie of each type.

SAMPLE INPUT
5 50
12 81 23 5 29

SAMPLE OUTPUT
3

Explanation

He can buy only 3 cookies at most. These cookies have the following prices: 12,23,5.
'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
#print 'Hello World!'
n,m=map(int,raw_input().split())
l=[int(i) for i in raw_input().split()]
l.sort()
p=0
c=0
for i in l:
	p+=i
	if m>p:
		c+=1
print c