{-# LANGUAGE TypeApplications #-}

import Control.Monad

main = do
    xs <- readLn @ Int >>= (flip replicateM) getLine
    ys <- readLn @ Int >>= (flip replicateM) getLine

    print $ (foldl max 0 . fmap (\x -> ((length . filter (== x)) xs) - ((length . filter (== x)) ys))) xs
