#!/usr/bin/env ruby

# k = gets.chomp.split(' ').map(&:to_i)

# if k[0] == k[2] * 2 && k[1] == k[3] * 2
#   puts "#{k[0] * k[1] /2} 1"
# else
#   puts "#{k[0] * k[1] /2} 0"
# end


k = gets.chomp.split.map(&:to_i)
l = k = gets.chomp.split.map(&:to_i)

len = 0
count = 1
l.each do |v|
  len += v
  break if len > k[1]
  count += 1
end

puts count