N, X = gets.chomp.split.map(&:to_i)
LS = gets.chomp.split.map(&:to_i)


if LS.inject(&:+) <= X # sumは2.4以降
  puts (N + 1)
else
  sum = 0
  i = 0
  
  until sum > X do
    sum += LS[i]
    i += 1
  end
  
  puts i
end