#!/user/bin/env ruby

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


coord = 0
counter = 0

p N, X
p array

while coord <= X
  # puts coord
  coord = coord + array[counter]
  counter = counter + 1
  break if counter == N
end

puts counter
