n = int(eval(input()))

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

a = n

cnt = 0

for i in p:

	if i <= a:

		cnt += 1

	a = min(a,i)

print (cnt)

n = int(eval(input()))

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

x = 2*(10**5)+1

c = 0

for i in p:

	if i < x:

		x = i

		c += 1

print (c)

n = int(eval(input()))
p = list(map(int, input().split()))
a = n
cnt = 0
for i in p:
    if i <= a:
        cnt += 1
    a = min(a, i)
print(cnt)

n = int(eval(input()))
p = list(map(int, input().split()))
x = 2 * (10**5) + 1
c = 0
for i in p:
    if i < x:
        x = i
        c += 1
print(c)

-a = n -cnt = 0 +x = 2 * (10**5) + 1 +c = 0 -    if i <= a: -        cnt += 1 -    a = min(a, i) -print(cnt) +    if i < x: +        x = i +        c += 1 +print(c)