import Control.Applicative
import Control.Monad
import Data.List
main = do
    n <- getLine
    s <- map read . words <$> getLine
    q <- getLine
    t <- map read . words <$> getLine
    let s' = nub s
    let a = s \\ t
    print $ length a