local n, x = io.read("*n", "*n")
local t = {}
for i = 1, n do
  t[i] = io.read("*n")
end
local cnt = 1
local sum = 0
for i = 1, n do
  sum = sum + t[i]
  if sum <= x then cnt = cnt + 1 end
end
print(cnt)
