import Control.Monad import Data.List main = do n <- readLn ws <- replicateM n $ map read . words <$> getLine :: IO [[Int]] let ws' = map length $ group $ sort $ foldr1 (++) ws let s2 = sum $ map (`div` 2) ws' let s4 = (`div` 4) $ sum $ map (`mod` 2) ws' putStrLn . show $ s2 + s4