require 'pp'
require 'set'

n, x = gets.chomp!.split(" ").map(&:to_i)
l_n = gets.chomp!.split(" ").map(&:to_i)

d_n = [0]
count = 1
n.times do |i|
    d_n[i+1] = d_n[i] + l_n[i]
    if d_n[i+1] <= x
        count += 1
    else
        break
    end
end

puts count
