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

let n = read int
let hs = reads int
let mutable tmp = 0
let mutable max = 0
for i = 0 to n - 2 do
    if hs.[i] >= hs.[i+1] then 
        tmp <- tmp + 1
        if tmp >= max then 
            max <- tmp;
    else tmp <- 0
printfn "%d" max