n,x=gets.split.map &:to_i
l=gets.split.map &:to_i
sum,cnt=0,1
(0...n).each do |i|
  sum += l[i]
  puts "i,sum:#{i},#{sum}"
  if sum >= x
    cnt += i+1
    break
  else
    cnt += i
  end
end
puts cnt