( N, X ) = gets.split(' ').map(&:to_i)
b = gets.split(' ').map(&:to_i)
a = [0]
N.times { |i| a.push(a[i] + b[i]) }
ret = 0
a.each_with_index { |x, i| 
  if X >= x
    ret = i + 1
  else
    break
  end
}
puts ret