n = int(eval(input()))

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

ans = 1

mi = p[0]

for i in range(1, n):

    if mi > p[i]:

        mi = p[i]

        ans += 1

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

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

mi = 10 ** 6

cnt = 0

for i in p:

    if mi > i:

        cnt += 1

        mi = i



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

n = int(eval(input()))
p = list(map(int, input().split()))
mi = 10**6
cnt = 0
for i in p:
    if mi > i:
        cnt += 1
        mi = i
print(cnt)

-ans = 1 -mi = p[0] -for i in range(1, n): -    if mi > p[i]: -        mi = p[i] -        ans += 1 -print(ans) +mi = 10**6 +cnt = 0 +for i in p: +    if mi > i: +        cnt += 1 +        mi = i +print(cnt)