import numpy as np
N,x = map(int,input().split(' '))
a = list(map(int,input().split(' ')))

count = 0

a = np.array(sorted(a))

acum = a.cumsum()

for i,y in enumerate:
  if y>=x:
    count = i
    break
    
print(min(count,N))