n = int(input()) rednibr = 0 for i in range(1,n+1): temperatura = int(input()) if (temperatura<0): rednibr = i print(rednibr)