N = int(eval(input()))

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



r = 0

x = 200001

for num in P:

  if x >= num:

    r += 1

    x = num

print(r)
def main():

    n = int(eval(input()))

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



    num = float('inf')

    r = 0

    for pe in p:

        if num >= pe:

            r += 1

            num = pe

    print(r)





if __name__ == '__main__':

    main()

N = int(eval(input()))
P = list(map(int, input().split()))
r = 0
x = 200001
for num in P:
    if x >= num:
        r += 1
        x = num
print(r)

def main():
    n = int(eval(input()))
    p = list(map(int, input().split()))
    num = float("inf")
    r = 0
    for pe in p:
        if num >= pe:
            r += 1
            num = pe
    print(r)


if __name__ == "__main__":
    main()

-N = int(eval(input())) -P = list(map(int, input().split())) -r = 0 -x = 200001 -for num in P: -    if x >= num: -        r += 1 -        x = num -print(r) +def main(): +    n = int(eval(input())) +    p = list(map(int, input().split())) +    num = float("inf") +    r = 0 +    for pe in p: +        if num >= pe: +            r += 1 +            num = pe +    print(r) + + +if __name__ == "__main__": +    main()