n, x = gets.strip.split(" ").map(&:to_i)
jumps = gets.strip.split.map(&:to_i)
now_place=0

answer=0
while (x >= now_place && !(n+1 == answer)) do 
  now_place += jumps[answer]
  answer +=1
end
puts answer