import Data.List (nub)

main :: IO ()
main = getLine >> getLine >>= print . f . length . nub . fmap readInt . words
    where
        f m = if even m then m - 1 else m
        readInt = read :: String -> Int
