# https://atcoder.jp/contests/abc130/tasks/abc130_b


N, X = gets.split.map(&:to_i)
Ls = gets.split.map(&:to_i)
Ds = Ls.reduce([0]) { |memo, d| memo + [memo.last + d] }
ans = Ds.count { |d| d <= X }
puts ans
