n, x = gets.split.map(&:to_i)
l = gets.split.map(&:to_i)
arr = [0] + Array.new(n)
ans = 1

n.times do |i|
  if arr[i] + l[i] > x
    break
  else
    arr[i+1] = arr[i] + l[i]
    ans += 1
  end
end

puts ans