import Data.List
import qualified Data.ByteString.Char8 as B
import Data.Maybe (fromJust)

main :: IO ()
main = do
    _ <- B.getLine
    as <- map (fst . fromJust . B.readInt) . B.lines <$> B.getContents
    print $ groupCount 0 $ sort as
    where
        groupCount c []  = c
        groupCount c [_] = c + 1
        groupCount c (x:y:xs)
            | x == y = groupCount c xs
            | otherwise = groupCount (c + 1) (y:xs)
