n = int(eval(input()))

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



cnt = 1

tmp_min = p[0]

for i in range(1, n):

    tmp_min = min(tmp_min, p[i]) 

    if tmp_min == p[i]:

        cnt += 1

print(cnt)
n = int(eval(input()))

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



cnt = 1

tmp_min = p[0]

for i in range(1, n):

    if tmp_min >= p[i]:

        tmp_min = p[i]

        cnt += 1

print(cnt)

        
n = int(eval(input()))
p = list(map(int, input().split()))
cnt = 1
tmp_min = p[0]
for i in range(1, n):
    tmp_min = min(tmp_min, p[i])
    if tmp_min == p[i]:
        cnt += 1
print(cnt)

n = int(eval(input()))
p = list(map(int, input().split()))
cnt = 1
tmp_min = p[0]
for i in range(1, n):
    if tmp_min >= p[i]:
        tmp_min = p[i]
        cnt += 1
print(cnt)

-    tmp_min = min(tmp_min, p[i]) -    if tmp_min == p[i]: +    if tmp_min >= p[i]: +        tmp_min = p[i]