N = int(eval(input()))

P = [int(p) for p in input().split()]



ans = 0

m = P[0]

for i in range(N):

    if P[i] <= m:

        ans += 1

        m = P[i]



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

P = [int(p) for p in input().split()]



M = N+1

cnt = 0

for p in P:

    if p < M:

        cnt += 1

        M = p



print(cnt)
N = int(eval(input()))
P = [int(p) for p in input().split()]
ans = 0
m = P[0]
for i in range(N):
    if P[i] <= m:
        ans += 1
        m = P[i]
print(ans)

N = int(eval(input()))
P = [int(p) for p in input().split()]
M = N + 1
cnt = 0
for p in P:
    if p < M:
        cnt += 1
        M = p
print(cnt)

-ans = 0 -m = P[0] -for i in range(N): -    if P[i] <= m: -        ans += 1 -        m = P[i] -print(ans) +M = N + 1 +cnt = 0 +for p in P: +    if p < M: +        cnt += 1 +        M = p +print(cnt)