raw = gets.split(" ")
n=raw[0].to_i
x=raw[1].to_i
datas = gets.split(" ").map{|ye|ye.to_i}
ans = 1
last = 0
len = 0
while last < n
  len += datas[last]
  last += 1
  break if len > x
  ans += 1
end
puts ans.to_s