N = int(eval(input()))

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

i_num = 0

min_P = P_list[0]

for p in P_list:

    if p <= min_P:

        min_P = p

        i_num += 1

print(i_num)
def main():

    N = int(eval(input()))

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

    i_num = 0

    min_P = P_list[0]

    for p in P_list:

        if p <= min_P:

            min_P = p

            i_num += 1

    print(i_num)



if __name__ == "__main__":

    main()
N = int(eval(input()))
P_list = list(map(int, input().split()))
i_num = 0
min_P = P_list[0]
for p in P_list:
    if p <= min_P:
        min_P = p
        i_num += 1
print(i_num)

def main():
    N = int(eval(input()))
    P_list = list(map(int, input().split()))
    i_num = 0
    min_P = P_list[0]
    for p in P_list:
        if p <= min_P:
            min_P = p
            i_num += 1
    print(i_num)


if __name__ == "__main__":
    main()

-N = int(eval(input())) -P_list = list(map(int, input().split())) -i_num = 0 -min_P = P_list[0] -for p in P_list: -    if p <= min_P: -        min_P = p -        i_num += 1 -print(i_num) +def main(): +    N = int(eval(input())) +    P_list = list(map(int, input().split())) +    i_num = 0 +    min_P = P_list[0] +    for p in P_list: +        if p <= min_P: +            min_P = p +            i_num += 1 +    print(i_num) + + +if __name__ == "__main__": +    main()