import qualified Data.Vector.Unboxed as U
import qualified Data.Vector as V
import qualified Data.ByteString.Char8 as C
import Debug.Trace
import Data.List
import Control.Monad
import Control.Arrow
import Data.Ord
import qualified Data.IntSet as IS


r :: Int -> IO (U.Vector Int)
r n = U.unfoldrN n (C.readInt . C.dropWhile (==' ')) <$> C.getLine

r' :: IO [Int]
r'  =   unfoldr    (C.readInt . C.dropWhile (==' ')) <$> C.getLine



main :: IO ()
main = do
    [n,k] <- r'
    ass <- replicateM k (do
            d <- readLn :: IO Int
            as <- r'
            return $ IS.fromList as
        )
    let allSunuke = IS.fromList [1..n]
    let safeSunuke = IS.unions ass
    print $ IS.size $ IS.difference allSunuke safeSunuke
