height :: Int -> Int -> [Int] -> [Int]
height cnt _ [] = [cnt]
height cnt prev (x:xs)
    | prev < x  = cnt : height 0 x xs
    | otherwise = height (cnt+1) x xs

solve :: [Int] -> Int
solve xs = maximum hs
    where hs = height 0 (head xs) (tail xs)

main = getLine >> map read . words <$> getLine >>= print . solve
