import sys



n, *p = list(map(int, sys.stdin.read().split()))



def main():

    mi = float('inf')

    res = 0

    for i in range(n):

        if p[i] <= mi:

            res += 1

            mi = p[i]

    return res



if __name__ == '__main__':

    ans = main()

    print(ans)
import sys



n, *p = list(map(int, sys.stdin.read().split()))



def main():

    m = float('inf')

    cnt = 0

    for x in p:

        if x > m: continue

        cnt += 1

        m = x

    print(cnt)



if __name__ ==  '__main__':

    main()
import sys

n, *p = list(map(int, sys.stdin.read().split()))


def main():
    mi = float("inf")
    res = 0
    for i in range(n):
        if p[i] <= mi:
            res += 1
            mi = p[i]
    return res


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

import sys

n, *p = list(map(int, sys.stdin.read().split()))


def main():
    m = float("inf")
    cnt = 0
    for x in p:
        if x > m:
            continue
        cnt += 1
        m = x
    print(cnt)


if __name__ == "__main__":
    main()

-    mi = float("inf") -    res = 0 -    for i in range(n): -        if p[i] <= mi: -            res += 1 -            mi = p[i] -    return res +    m = float("inf") +    cnt = 0 +    for x in p: +        if x > m: +            continue +        cnt += 1 +        m = x +    print(cnt) -    ans = main() -    print(ans) +    main()