inp = gets.split.map!(&:to_i)
L = gets.split.map!(&:to_i)

dist = 0
count = 1
(inp[0]).times do |i|
  dist += L[i]
  if dist <= inp[1]  #まだ超えてなかったら
    count += 1
  else  #もうX地点を超えてたら
    break
  end
end

p count
