n = int(eval(input()))

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



ans = 0

min_p = P[0]

for p in P:

    if p <= min_p:

        ans += 1

        min_p = min(min_p, p)



print(ans)

n = int(eval(input()))

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



ans = 0

min_p = P[0]

for p in P:

    if p <= min_p:

        ans += 1

        min_p = p



print(ans)

n = int(eval(input()))
P = list(map(int, input().split()))
ans = 0
min_p = P[0]
for p in P:
    if p <= min_p:
        ans += 1
        min_p = min(min_p, p)
print(ans)

n = int(eval(input()))
P = list(map(int, input().split()))
ans = 0
min_p = P[0]
for p in P:
    if p <= min_p:
        ans += 1
        min_p = p
print(ans)

-        min_p = min(min_p, p) +        min_p = p