str = gets.split
array = gets.split
n, x = str[0].to_i, str[1].to_i

array = array.map{|n| n.to_i}

counter = 1
d = 0
i = 0

while i <= n + 1
d += array[i]
    if d <= x
        i += 1
        counter += 1
    else
        print counter
        break
    end
end

print counter if d <= x