require 'set'; require 'prime'
INF=Float::INFINITY; MOD=10**9+7
n,x = gets.chomp.split.map(&:to_i)
l = gets.chomp.split.map(&:to_i)

d = 0
ans = 0
n.times do |i|
  d += l[ans]
  ans += 1
  unless d <= x
    ans += 1
    break
  end
end

puts ans