count, start = 0, 0
count,start = gets.chomp.split(' ').map(&:to_i)
nums = gets.chomp.split(' ').map(&:to_i)
times = 0
sum = 0
nums.each do |num|
  times = times + 1 if sum <= start
  sum = sum + num
end
puts times