open System
let R T = stdin.ReadLine()|> T
let RS T = stdin.ReadLine().Split()|>Array.map T
let Mod = (1e9|>int64)+7L
[<EntryPoint>]
let main argv =
    let N = R int
    let P = RS int
    let mutable m = 300000
    let mutable ans = 0
    for i in [0..N-1] do
        if P.[i]<=m then
            ans <- ans + 1
            m <- P.[i]
    stdout.WriteLine ans
    0
