n = int(eval(input()))

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



m = 200001

ans = 0



for i in range(n):

  if l[i] < m:

    m = l[i]

    ans += 1



print(ans)
f=input

f(); l=list(map(int,f().split()))

a,m=0,200001

for i in l:

  if i<m: m=i; a+=1

print(a)
n = int(eval(input()))
l = list(map(int, input().split()))
m = 200001
ans = 0
for i in range(n):
    if l[i] < m:
        m = l[i]
        ans += 1
print(ans)

f = input
f()
l = list(map(int, f().split()))
a, m = 0, 200001
for i in l:
    if i < m:
        m = i
        a += 1
print(a)

-n = int(eval(input())) -l = list(map(int, input().split())) -m = 200001 -ans = 0 -for i in range(n): -    if l[i] < m: -        m = l[i] -        ans += 1 -print(ans) +f = input +f() +l = list(map(int, f().split())) +a, m = 0, 200001 +for i in l: +    if i < m: +        m = i +        a += 1 +print(a)