N = int(eval(input()))

P = list(map(int,input().split()))

count = 1

 

if N > 0:

  min = P[0]

  

for i in range(1, N): 

  if min < P[i]:

    continue

  elif min >= P[i]:

    min = P[i]

    count += 1

    continue      

print(count)
N = int(eval(input()))

P = list(map(int,input().split()))

count = 1

 

min = P[0]

  

for i in range(1, N): 

  if min >= P[i]:

    min = P[i]

    count += 1   

print(count)
N = int(eval(input()))
P = list(map(int, input().split()))
count = 1
if N > 0:
    min = P[0]
for i in range(1, N):
    if min < P[i]:
        continue
    elif min >= P[i]:
        min = P[i]
        count += 1
        continue
print(count)

N = int(eval(input()))
P = list(map(int, input().split()))
count = 1
min = P[0]
for i in range(1, N):
    if min >= P[i]:
        min = P[i]
        count += 1
print(count)

-if N > 0: -    min = P[0] +min = P[0] -    if min < P[i]: -        continue -    elif min >= P[i]: +    if min >= P[i]: -        continue