main = do
    _ <- getLine
    hs <- (map read) . words <$> getLine
    print $ sum [countNumBlocks n (dropWhile (<n) hs) | n <- [1..100]]
    
countNumBlocks :: Int -> [Int] -> Int
countNumBlocks n [] = 0
countNumBlocks n xs = 1 + countNumBlocks n (dropWhile (<n) . dropWhile (>=n) $ xs)