local n, x = io.read("*n", "*n")

L = {}
for i=1, n do
  L[i] = io.read("*n")
end

local cnt = 0
local bound = 0

for i = 1, n do
  bound = bound + L[i]
  if L[i] <= x then
    cnt = cnt + 1
  end
end

print(cnt)