input1 = gets.split(" ").map{|item| item.to_i}
input2 = gets.split(" ").map{|item| item.to_i}

N = input1[0]
X = input1[1]

count = 0
total_length = 0
i = 1

while total_length <= X
  count += 1
  total_length += input2[i-1]
  i += 1
end

p count