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

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

local cnt = 1
local d = 0

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

print(cnt)