n = int(eval(input()))

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



count = 0

a = p[0]

for i in range(n):

  if a >= p[i]:

    a = p[i]

    count+=1

print(count)

n = int(eval(input()))

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



t = p[0]

ans = 0



for i in p:

  if i <= t:

    ans += 1

    t = i

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

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

-count = 0 -a = p[0] -for i in range(n): -    if a >= p[i]: -        a = p[i] -        count += 1 -print(count) +t = p[0] +ans = 0 +for i in p: +    if i <= t: +        ans += 1 +        t = i +print(ans)