N, X = gets.chomp.split.map(&:to_i)
LS = gets.chomp.split.map(&:to_i)
LS_SIZE_MAX = 100

sum = 0
i = 0

until sum > X do
  sum += LS[i]
  i += 1
  if i == LS_SIZE_MAX - 1
    i += 1
    break
  end
end

puts i