main :: IO ()
main = do
    getLine
    as <- map read . words <$> getLine :: IO [Int]
    print $ solve 200000 as


solve :: Int -> [Int] -> Int
solve _ [] = 0
solve val (a:as)
    | val < a = solve val as
    | otherwise = solve a as + 1