import Control.Monad
import Control.Applicative
import Data.List
import Data.Array

strToInt s = (read :: String -> Int)

main = do

   n <- readLn :: IO Int
   an <- replicateM n (readLn :: IO Int)
   let bn = qsort an
   print (length (f [] bn))


--f :: [Int] -> [Int] -> Int
f xn [] = xn
f [] (b:bn) = f [b] bn
f xn (b:bn) = if (last xn) == b
              then f (drop 1 xn) bn
              else f (xn ++ [b]) bn



qsort []     = []
qsort (p:xs) = qsort lt ++ [p] ++ qsort gteq
                 where
                   lt   = [x | x <- xs, x < p]
                   gteq = [x | x <- xs, x >= p]