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 = 0
d = 0
L.each do |l|
  if d <= X then
    d += l
    result += 1
  end
end
result += 1 if d < X
if L[0] > X then
  puts 1
else
  puts result
end