import Control.Monad
import qualified Data.IntSet as S

main = do
  li <- getLine
  let [n,k] = map read $ words li
  ass <- forM [1..k] (\_ -> do
    getLine -- di
    li <- getLine
    let as = map read $ words li
    return as
    )
  let ans = compute n k ass
  print ans

compute :: Int -> Int -> [[Int]] -> Int
compute n k ass = n - (S.size $ S.fromList $ concat ass)