N = int(eval(input()))

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

m = float('INF')

ans = 0



for i in range(N):

    if P[i] < m:

        ans += 1

        m = P[i]

print(ans)

N = int(eval(input()))

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

minimal = float('inf')

ans = 0

for i in P:

    if minimal >= i:

        ans += 1

        minimal = i

print(ans)

N = int(eval(input()))
P = list(map(int, input().split()))
m = float("INF")
ans = 0
for i in range(N):
    if P[i] < m:
        ans += 1
        m = P[i]
print(ans)

N = int(eval(input()))
P = list(map(int, input().split()))
minimal = float("inf")
ans = 0
for i in P:
    if minimal >= i:
        ans += 1
        minimal = i
print(ans)

-m = float("INF") +minimal = float("inf") -for i in range(N): -    if P[i] < m: +for i in P: +    if minimal >= i: -        m = P[i] +        minimal = i