n, x = gets.split(' ')

x = x.to_i
d = 0
count = 1

a = gets.split(' ').map(&:to_i)

n.to_i.times do |i|
    d += a[i]
    if d <= x then
        count += 1
    else
        break
    end
end

print count