N, X = gets.split(" ").map(&:to_i)
L = gets.split(" ").map(&:to_i)
# S = gets.chomp
# N = gets.to_i

pos = 0
cnt = 0
while pos <= X
  if cnt >= L.size
    cnt += 1
    break
  end
  pos += L[cnt]
  cnt += 1
end
puts cnt
