N=0 #кол-во
N1=0
N2=0
N3=0
N4=0
counter=1
ans=0
for i in range(N):
x=int(input())
if counter=1 and x>N1:
N1=x
counter=2
elif counter=2 and x>N2:
N2=x
counter=3
elif counter=3 and x>N3:
N3=x
counter=4
elif counter=4 and x>N4:
N4=x
counter=1
for i in [N1,N2,N3,N4]:
if i<0:
ans+=1
print(ans)