N, X = gets.split.map(&:to_i)

L = gets.split(" ")
cnt = 0
len = 0
L.each do |data|
    if len <= X then
        cnt += 1
    else
        break
    end
    len += data.to_i
end
if len <= X then
    cnt += 1
end
puts cnt