import Data.List
main = do
  getLine -- Nはいらない.
  as <- map read . words <$> getLine :: IO [Int]
  let evenevens = map (even . length) $ group $ sort as
  print $ length evenevens - if odd . length $ elemIndices True evenevens then 1 else 0