N, X = gets.chomp.split(" ").map(&:to_i)
L = gets.chomp.split(" ").map(&:to_i)
answer = 1
pos = 0
L.each do |l|
    if pos + l <= X
        pos += l
        answer += 1
    else
        break
    end
end
puts answer