import Control.Monad

main = do
  str <- getLine
  let [n, k] = map read (words str) ::[Int]
  as <- forM [1..k] $ \i -> do
    str <- getLine
    let d = read str ::Int
    str <- getLine
    let a = take d $ map read (words str) ::[Int]
    return a
  print $ length $ filter (\x -> not (x `elem` (concat as))) [1..n]
  