input = gets.chomp
n,x = input.split.collect{ |item| item.to_i}
input = gets.chomp
llist = input.split.collect{ |item| item.to_i}

point = 0
count = 1
llist.each do |i|
  point += i
  if point <= x
    count += 1
  else
    break
  end
end

puts count