import Control.Monad
import qualified Data.Set as Set

solve :: Int -> [[Int]] -> Int
solve n a = let size = Set.size $ Set.fromList $ concat a
            in n - size

main :: IO ()
main = do
  [n, k] <- map (read :: String -> Int) . words <$> getLine
  a <- replicateM k $ do
    getLine
    map (read :: String -> Int) . words <$> getLine
  print $ solve n a
