attrs = Array.new
while line = $stdin.gets
    attrs << line.chomp.split.map{|v| v.to_i }
end

tmp = attrs.shift
N = tmp[0]
X = tmp[1]
L = attrs.shift
result = 1
d = 0
L.each do |l|
  result += 1
  break if d > X
  d += l
end
result += 1 if d < X
puts result