#n = int(input())

#l = list(map(int, input().split()))



'''

A=[]

B=[]

for i in range():

    a, b = map(int, input().split())

    A.append(a)

    B.append(b)'''





n = int(eval(input()))

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



mi = 1000000000

cnt = 0

for i in range(n):

    if p[i] <= mi:

        cnt += 1

    if mi > p[i]:

        mi = p[i]



print(cnt)

#n = int(input())

#l = list(map(int, input().split()))



'''

A=[]

B=[]

for i in range():

    a, b = map(int, input().split())

    A.append(a)

    B.append(b)'''



def main():

    n = int(eval(input()))

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



    mi = 1000000000

    cnt = 0

    for i in range(n):

        if p[i] <= mi:

            cnt += 1

        if mi > p[i]:

            mi = p[i]

    print(cnt)



main()
# n = int(input())
# l = list(map(int, input().split()))
"""
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)"""
n = int(eval(input()))
p = list(map(int, input().split()))
mi = 1000000000
cnt = 0
for i in range(n):
    if p[i] <= mi:
        cnt += 1
    if mi > p[i]:
        mi = p[i]
print(cnt)

# n = int(input())
# l = list(map(int, input().split()))
"""
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)"""


def main():
    n = int(eval(input()))
    p = list(map(int, input().split()))
    mi = 1000000000
    cnt = 0
    for i in range(n):
        if p[i] <= mi:
            cnt += 1
        if mi > p[i]:
            mi = p[i]
    print(cnt)


main()

-n = int(eval(input())) -p = list(map(int, input().split())) -mi = 1000000000 -cnt = 0 -for i in range(n): -    if p[i] <= mi: -        cnt += 1 -    if mi > p[i]: -        mi = p[i] -print(cnt) + + +def main(): +    n = int(eval(input())) +    p = list(map(int, input().split())) +    mi = 1000000000 +    cnt = 0 +    for i in range(n): +        if p[i] <= mi: +            cnt += 1 +        if mi > p[i]: +            mi = p[i] +    print(cnt) + + +main()