let read f = stdin.ReadLine() |> f
let reads f =  stdin.ReadLine().Split() |> Array.map f

let _ = read int
let hs = reads int |> Array.toList
let f xs =
    let rec loop xs acc =
        match xs with
        | [] -> acc
        | [_] -> acc
        | y::ys when y >= ys.Head -> loop ys (acc+1)
        | y::ys -> loop ys 0
    loop xs 0
    
printfn "%d" (f hs)