n = int(eval(input()))

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

c = 1

m = p[0]

for a in p[1:]:

    m = min(m, a)

    if m == a:

        c += 1

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

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

c = 0

m = p[0]

for i in range(n):

    if m >= p[i]:

        c += 1

        m = p[i]

print(c)
n = int(eval(input()))
p = list(map(int, input().split()))
c = 1
m = p[0]
for a in p[1:]:
    m = min(m, a)
    if m == a:
        c += 1
print(c)

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

-c = 1 +c = 0 -for a in p[1:]: -    m = min(m, a) -    if m == a: +for i in range(n): +    if m >= p[i]: +        m = p[i]