n,x=gets.split.map(&:to_i)
 
ln = []
while l = $stdin.gets do
  ln << l.chomp.split(" ")
end
 
now = 0
bound = 1
n.times do |i|
  now += ln[0][i-1].to_i
  break if now > x
  bound += 1
end
 
puts bound