N = int(eval(input()))

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



l = []

a = P[0]

for i in range(N):

    if P[i] <= a:

        a = P[i]

        continue

    else:

        l.append(i)

print((N - len(l)))
N = int(eval(input()))

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



l = 0

a = P[0]

for p in P:

    if p <= a:

        a = p

        l += 1

        continue

print(l)
N = int(eval(input()))
P = list(map(int, input().split()))
l = []
a = P[0]
for i in range(N):
    if P[i] <= a:
        a = P[i]
        continue
    else:
        l.append(i)
print((N - len(l)))

N = int(eval(input()))
P = list(map(int, input().split()))
l = 0
a = P[0]
for p in P:
    if p <= a:
        a = p
        l += 1
        continue
print(l)

-l = [] +l = 0 -for i in range(N): -    if P[i] <= a: -        a = P[i] +for p in P: +    if p <= a: +        a = p +        l += 1 -    else: -        l.append(i) -print((N - len(l))) +print(l)