input = gets.chomp.split(" ").map(&:to_i)
n = input[0]
x = input[1]

l = gets.chomp.split(" ").map(&:to_i)

y = 0
cnt = 1

for i in 1..n do
    y = y+l[i-1]
    if y <= x 
        cnt += 1
    end
end

puts cnt