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

N,X = gets.delete("\n").split().map(&:to_i)
L = gets.delete("\n").split().map(&:to_i)

i = 1
j = 0
tmp = 0

L.each { |l| 
    if tmp + l <= X
        i += 1
        j = 1
        tmp = tmp + l 
    else
        if j == 0
           i = 0 
        end
        p i
        exit
    end
}
