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

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

count = 1
total_length = 0
i = 1

for i in 0..N-1
  total_length += input2[i]
  if total_length > X
    break
  else
    count += 1
  end
end

p count