# B - Bounding
def b_bounding
    n,x = gets.chomp.split(/\s/).map{|x| x.to_i}
    ln = gets.chomp.split(/\s/).map{|x| x.to_i}

    bouns = 1
    c = 0
    ln.each do |l|
        c += l
        break if c > x
        bouns += 1 if c <= x
    end

    puts bouns
end
# 3 6
# 3 4 5
# 0 3 7 12

#a_rounding
b_bounding