def main():



    N = int(eval(input()))

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



    min_v = float('inf')

    ans = 0

    for i in range(N):

        if p[i] <= min_v:

            ans += 1

        min_v  = min(min_v, p[i])

    return ans



if __name__ == '__main__':

    print((main()))
def main():



    N = int(eval(input()))

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



    ans = 0

    min_v = float('inf')

    for i in range(N):

        if P[i] <= min_v:

            min_v = P[i]

            ans += 1

    return ans



if __name__ == '__main__':

    print((main()))

def main():
    N = int(eval(input()))
    p = list(map(int, input().split()))
    min_v = float("inf")
    ans = 0
    for i in range(N):
        if p[i] <= min_v:
            ans += 1
        min_v = min(min_v, p[i])
    return ans


if __name__ == "__main__":
    print((main()))

def main():
    N = int(eval(input()))
    P = list(map(int, input().split()))
    ans = 0
    min_v = float("inf")
    for i in range(N):
        if P[i] <= min_v:
            min_v = P[i]
            ans += 1
    return ans


if __name__ == "__main__":
    print((main()))

-    p = list(map(int, input().split())) +    P = list(map(int, input().split())) +    ans = 0 -    ans = 0 -        if p[i] <= min_v: +        if P[i] <= min_v: +            min_v = P[i] -        min_v = min(min_v, p[i])