
def bounding(x, ls)
  count = 1
  pos = 0
  ls.each do |l|
    pos += l
    return count if x < pos
    count += 1
  end
  count
end

n, x = gets.split.map(&:to_i)
ls = gets.split.map(&:to_i)

puts bounding(x, ls)
