# C - Low Elements

def main():

    N, *P = list(map(int, open(0).read().split()))

    ans, cur_min = 0, P[0]

    for i in P:

        if i <= cur_min:

            ans += 1

        cur_min = min(cur_min, i)

    print(ans)





if __name__ == "__main__":

    main()

# C - Low Elements

def main():

    N, *P = list(map(int, open(0).read().split()))

    ans, cur_min = 0, P[0]

    for i in P:

        if i <= cur_min:

            ans += 1

            cur_min = i

    print(ans)





if __name__ == "__main__":

    main()

# C - Low Elements
def main():
    N, *P = list(map(int, open(0).read().split()))
    ans, cur_min = 0, P[0]
    for i in P:
        if i <= cur_min:
            ans += 1
        cur_min = min(cur_min, i)
    print(ans)


if __name__ == "__main__":
    main()

# C - Low Elements
def main():
    N, *P = list(map(int, open(0).read().split()))
    ans, cur_min = 0, P[0]
    for i in P:
        if i <= cur_min:
            ans += 1
            cur_min = i
    print(ans)


if __name__ == "__main__":
    main()

-        cur_min = min(cur_min, i) +            cur_min = i