n, *p_n = list(map(int, open(0).read().split()))



count = 0

p_n_min = p_n[0]

for i in range(n):

    p_n_min = min(p_n_min,p_n[i])

    if p_n_min == p_n[i]:

        count += 1

print(count)
n, *p_n = list(map(int, open(0).read().split()))



count = 0

min_num = p_n[0]

for p in p_n:

    if p <= min_num:

        min_num = p

        count += 1

print(count)
n, *p_n = list(map(int, open(0).read().split()))
count = 0
p_n_min = p_n[0]
for i in range(n):
    p_n_min = min(p_n_min, p_n[i])
    if p_n_min == p_n[i]:
        count += 1
print(count)

n, *p_n = list(map(int, open(0).read().split()))
count = 0
min_num = p_n[0]
for p in p_n:
    if p <= min_num:
        min_num = p
        count += 1
print(count)

-p_n_min = p_n[0] -for i in range(n): -    p_n_min = min(p_n_min, p_n[i]) -    if p_n_min == p_n[i]: +min_num = p_n[0] +for p in p_n: +    if p <= min_num: +        min_num = p