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

n = line[0]
x = line[1]

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

times = 1
pos = 0
line.each do |l|
    pos = pos + l
    if pos <= x
        times += 1
    else
        break
    end
end

p times
