N=int(eval(input()))

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

m=10**9



ans=0

for i in range(N):

    if P[i]<m:

        m=P[i]

        ans+=1

        

print(ans)
import sys

input = sys.stdin.readline



def I(): return int(eval(input()))

def MI(): return list(map(int, input().split()))

def LI(): return list(map(int, input().split()))



def main():

    mod=10**9+7

    N=I()

    P=LI()

    m=P[0]

    cnt=1

    for i in range(1,N):

        if P[i]<m:

            cnt+=1

            m=P[i]

            

    print(cnt)



main()

N = int(eval(input()))
P = list(map(int, input().split()))
m = 10**9
ans = 0
for i in range(N):
    if P[i] < m:
        m = P[i]
        ans += 1
print(ans)

import sys

input = sys.stdin.readline


def I():
    return int(eval(input()))


def MI():
    return list(map(int, input().split()))


def LI():
    return list(map(int, input().split()))


def main():
    mod = 10**9 + 7
    N = I()
    P = LI()
    m = P[0]
    cnt = 1
    for i in range(1, N):
        if P[i] < m:
            cnt += 1
            m = P[i]
    print(cnt)


main()

-N = int(eval(input())) -P = list(map(int, input().split())) -m = 10**9 -ans = 0 -for i in range(N): -    if P[i] < m: -        m = P[i] -        ans += 1 -print(ans) +import sys + +input = sys.stdin.readline + + +def I(): +    return int(eval(input())) + + +def MI(): +    return list(map(int, input().split())) + + +def LI(): +    return list(map(int, input().split())) + + +def main(): +    mod = 10**9 + 7 +    N = I() +    P = LI() +    m = P[0] +    cnt = 1 +    for i in range(1, N): +        if P[i] < m: +            cnt += 1 +            m = P[i] +    print(cnt) + + +main()