N, X = gets.split.map(&:to_i)
L = gets.split.map(&:to_i)

sum = Array.new(N+1) {0}

L.each_with_index do |l, i|
  sum[i+1] = sum[i] + l
end

# p sum

ans = 0
sum.each_with_index do |s, i|
  if s <= X
    ans += 1
  end
end

p ans
