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

records = []
records << 0
previous = 0

ls.each_with_index do |l, index|
  previous += l
  records << previous
end

count = 0
records.each do |record|
  if record <= x
    count += 1
  end
end

puts count