import Control.Monad
import Data.List

getInt = read <$> getLine :: IO Int
getInts = map read . words <$> getLine :: IO [Int]


calc l = (*) 2 $ flip div 2 $ (+) 1 $ sum $ map ((subtract 1) . length) $ group $ sort l

main = do
    n <- getInt
    as <- getInts
    print $ length as - calc as

