# frozen_string_literal: true

n, x = gets.split.map(&:to_i)
l = gets.split.map(&:to_i)

sum = 0
count = 0
0.upto(n - 1) do |i|
  sum += l[i]
  if sum > x
    count = i + 1
    break
  end
end
puts count
