n=int(eval(input()))

#n,p=map(int,input().split())

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

#l=[list(map(int,input().split())) for i in range(n)]



mn=pl[0]



mnl=[]

count=1

for i in range(n):

    mn=min(mn,pl[i])

    mnl.append(mn)



for i in range(1,n):

    if pl[i]<=mnl[i-1]:

        count+=1

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

#n,m=map(int,input().split())

#t=int(input())

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

#l=[list(map(int,input().split())) for i in range(n)]



mn=pl[0]

mnl=[]

for i in range(n):

    mn=min(mn,pl[i])

    mnl.append(mn)

res=0

for i in range(n):

    if pl[i]<=mnl[i]: res+=1

print(res)

n = int(eval(input()))
# n,p=map(int,input().split())
pl = list(map(int, input().split()))
# l=[list(map(int,input().split())) for i in range(n)]
mn = pl[0]
mnl = []
count = 1
for i in range(n):
    mn = min(mn, pl[i])
    mnl.append(mn)
for i in range(1, n):
    if pl[i] <= mnl[i - 1]:
        count += 1
print(count)

n = int(eval(input()))
# n,m=map(int,input().split())
# t=int(input())
pl = list(map(int, input().split()))
# l=[list(map(int,input().split())) for i in range(n)]
mn = pl[0]
mnl = []
for i in range(n):
    mn = min(mn, pl[i])
    mnl.append(mn)
res = 0
for i in range(n):
    if pl[i] <= mnl[i]:
        res += 1
print(res)

-# n,p=map(int,input().split()) +# n,m=map(int,input().split()) +# t=int(input()) -count = 1 -for i in range(1, n): -    if pl[i] <= mnl[i - 1]: -        count += 1 -print(count) +res = 0 +for i in range(n): +    if pl[i] <= mnl[i]: +        res += 1 +print(res)