n,x=gets.chomp.split(" ").map(&:to_i);
nums = gets.chomp.split(" ").map(&:to_i);

ball_x = 0
i=1

for num in nums do
    ball_x = ball_x + num
    if x < ball_x
        break
    end
    i = i+1
end

print("#{i}")