import qualified Data.ByteString.Char8 as B
import qualified Data.Vector.Unboxed as VU
import qualified Data.Map as MP
import Data.Maybe
import Data.Char

make xs = VU.foldl' step MP.empty xs
    where
        step m x =
            case MP.lookup x m of
                Just _ -> MP.adjust (+1) x m
                Nothing -> MP.insert x 1 m

solve m
    | MP.null m = 0
    | odd v = 1 + solve m'
    | otherwise = solve m'
        where
            ((_,v), m') = MP.deleteFindMin m

main = do
    n <- readLn :: IO Int
    xs <- VU.replicateM n (fst . fromJust . B.readInt <$> B.getLine)
    let m = make xs
    print $ solve m