nums = gets.chomp.split(" ").map(&:to_i)
cnt = nums[0]
x = nums[1]
bounds = gets.chomp.split(" ").map(&:to_i)
bounds_cnt = 1
current_x = 0
bounds.each_with_index do |bound|
  current_x = current_x + bound
  if x >= current_x
    bounds_cnt += 1
  end
end

p bounds_cnt
    