N = int(eval(input()))

P = [int(x) for x in input().split()]

R = 1000000

c = 0

for i in range(N):

  if min(R, P[i])==P[i]:

    c += 1

    R = P[i]

  else:

    pass

print(c)
N = int(eval(input()))

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

m = P[0]

S = 0

for p in P:

  if m>=p:

    S += 1

  m = min(m, p)

print(S)
N = int(eval(input()))
P = [int(x) for x in input().split()]
R = 1000000
c = 0
for i in range(N):
    if min(R, P[i]) == P[i]:
        c += 1
        R = P[i]
    else:
        pass
print(c)

N = int(eval(input()))
P = list(map(int, input().split()))
m = P[0]
S = 0
for p in P:
    if m >= p:
        S += 1
    m = min(m, p)
print(S)

-P = [int(x) for x in input().split()] -R = 1000000 -c = 0 -for i in range(N): -    if min(R, P[i]) == P[i]: -        c += 1 -        R = P[i] -    else: -        pass -print(c) +P = list(map(int, input().split())) +m = P[0] +S = 0 +for p in P: +    if m >= p: +        S += 1 +    m = min(m, p) +print(S)