open System

#nowarn "25"

let readLine _ = Console.In.ReadLine()
let readInt<'a> = readLine >> int
let readLong<'a> = readLine >> int64
let readFloat<'a> = readLine >> float
let readArray _ = readLine().Split ' '
let readArrayInt _ = readArray() |> Array.map (int)

[<EntryPoint>]
let main _ =
    let n = readInt()
    let P = readArrayInt()
    let mutable min = Int32.MaxValue
    let mutable cnt = 0
    for pi in P do
        if pi <= min then
            min <- pi
            cnt <- cnt + 1
    printfn "%d" cnt
    0 // return an integer exit code
