N = int(eval(input()))

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



ans = 1

index = P[0]



for i in range(1, N):

    if index > P[i]:

        index = P[i]

        ans += 1





print(ans)

#!/usr/bin/env python3



N = int(eval(input()))

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

M = [0] * N

M[0] = P[0]

m = P[0]

for i in range(1, N):

    m = min(P[i], m)

    M[i] = m





ans = 0

for i in range(N):

    if P[i] <= M[i]:ans+=1



print(ans)

N = int(eval(input()))
P = list(map(int, input().split()))
ans = 1
index = P[0]
for i in range(1, N):
    if index > P[i]:
        index = P[i]
        ans += 1
print(ans)

#!/usr/bin/env python3
N = int(eval(input()))
P = list(map(int, input().split()))
M = [0] * N
M[0] = P[0]
m = P[0]
for i in range(1, N):
    m = min(P[i], m)
    M[i] = m
ans = 0
for i in range(N):
    if P[i] <= M[i]:
        ans += 1
print(ans)

+#!/usr/bin/env python3 -ans = 1 -index = P[0] +M = [0] * N +M[0] = P[0] +m = P[0] -    if index > P[i]: -        index = P[i] +    m = min(P[i], m) +    M[i] = m +ans = 0 +for i in range(N): +    if P[i] <= M[i]: