n, x = gets.split.map(&:to_i)
l_list = gets.split.map(&:to_i)

count = 0
d = 0
last_d = 0
(n + 1).times do |i|
  if i == 0
    count += 1
    next
  end
  
  d = last_d + l_list[i-1]
  last_d = d
  
  if d <= x
    count += 1
  else
    break
  end
end

puts count