let rec solution a i c ans =
    if i == Array.length a-1 then max c ans
    else if a.(i) >= a.(i+1) then solution a (i+1) (c+1) ans
    else solution a (i+1) 0 @@ max c ans;;

Printf.printf "%d\n" @@
Scanf.scanf "%d\n" @@ fun n ->
    let a = Array.init n @@ fun _ -> Scanf.scanf "%d " @@ fun n -> n in
    solution a 0 0 0;;
