N, x = map(int, input().split())
A = list(map(int, input().split()))
cnt = 0
for i in range(len(A)):
  if x < min(A):
    print(cnt)
    break
  elif i == len(A)-1:
    print(cnt+1)
  else:
    x -= min(A)
    cnt += 1
