N,X = gets.chomp.split(" ").map(&:to_i)
L = gets.chomp.split(" ").map(&:to_i)
sum = 0
count = 1
for i in 0..L.length-1 do
    sum = sum + L[i]
    if sum <= X
        count = count + 1
    end
end
puts count