# B - Bounding
# https://atcoder.jp/contests/abc130/tasks/abc130_b

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

cnt = 0
d = 0

L.each do |l|
    d = d + l
    
    if d <= L
        cnt + 1    
    end
end

p cnt
