n = int(eval(input()))

arr = input().split(' ')

arr = [int(i) for i in arr]

count = 0

minimum = arr[0]

for num in arr:

  if num <= minimum:

    minimum = num

    count += 1

print(count)
import sys

input = sys.stdin.readline

 

n = int(eval(input()))

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

count = 0

minimum = arr[0]

for num in arr:

  if num <= minimum:

    minimum = num

    count += 1

print(count)
n = int(eval(input()))
arr = input().split(" ")
arr = [int(i) for i in arr]
count = 0
minimum = arr[0]
for num in arr:
    if num <= minimum:
        minimum = num
        count += 1
print(count)

import sys

input = sys.stdin.readline
n = int(eval(input()))
arr = list(map(int, input().split()))
count = 0
minimum = arr[0]
for num in arr:
    if num <= minimum:
        minimum = num
        count += 1
print(count)

+import sys + +input = sys.stdin.readline -arr = input().split(" ") -arr = [int(i) for i in arr] +arr = list(map(int, input().split()))