N, *D = [list(map(int, s.split())) for s in open(0)]

N, D = N[0], D[0]



cnt = 1

min_v = D[0]

for i in range(1, len(D)):

    if min_v >= D[i]:

        cnt += 1

        min_v = D[i]

print(cnt)
def main():

    _ = int(eval(input()))

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

    min_value = 1e10

    cnt = 0

    for a in A:

        if a <= min_value:

            min_value = a 

            cnt += 1

    print(cnt)





if __name__ == "__main__":

    main()
N, *D = [list(map(int, s.split())) for s in open(0)]
N, D = N[0], D[0]
cnt = 1
min_v = D[0]
for i in range(1, len(D)):
    if min_v >= D[i]:
        cnt += 1
        min_v = D[i]
print(cnt)

def main():
    _ = int(eval(input()))
    A = list(map(int, input().split()))
    min_value = 1e10
    cnt = 0
    for a in A:
        if a <= min_value:
            min_value = a
            cnt += 1
    print(cnt)


if __name__ == "__main__":
    main()

-N, *D = [list(map(int, s.split())) for s in open(0)] -N, D = N[0], D[0] -cnt = 1 -min_v = D[0] -for i in range(1, len(D)): -    if min_v >= D[i]: -        cnt += 1 -        min_v = D[i] -print(cnt) +def main(): +    _ = int(eval(input())) +    A = list(map(int, input().split())) +    min_value = 1e10 +    cnt = 0 +    for a in A: +        if a <= min_value: +            min_value = a +            cnt += 1 +    print(cnt) + + +if __name__ == "__main__": +    main()