let n = int (stdin.ReadLine())
let f = 0 :: (stdin.ReadLine().Split() |> Array.map int |> List.ofArray)
let mutable count = 0
for i in 1..n do
    if f.[i] - f.[i - 1] >= 0 then count <- count + 1
printfn "%d" count