import Control.Monad
import Data.Maybe
import Data.List
import Text.Printf
import qualified Data.IntSet as S
import qualified Data.ByteString.Char8 as C

parseInt :: C.ByteString -> Int
parseInt = fst . fromJust . C.readInt

main :: IO ()
main = do
  [n, k] <- map parseInt . C.words <$> C.getLine
  ds <- replicateM k $ do
    _ <- C.getLine
    map parseInt . C.words <$> C.getLine
  let removeAll = foldl' (\s d -> S.delete d s)
      rest = foldl' removeAll (S.fromList [1..n]) ds
  printf "%d\n" (S.size rest)