arr = gets.strip.split(" ").map!(&:to_i)
l = gets.strip.split(" ").map!(&:to_i)
n = arr[0]
x = arr[1]
sum = 0
count = 1
n.times do |i|
  sum += l[i]
  if(sum > x) then
    puts count
    exit
  end
  count += 1
end
puts count
