import Debug.Trace
import Control.Monad
import qualified Data.Set as S

inputIntList :: IO [Int]
inputIntList = map read . words <$> getLine :: IO[Int]

getAs :: [String] -> [[Int]]
getAs [] = []
getAs (d:as:other) = (map read . words $ as :: [Int]) : (getAs other)


getAs'Set :: [[Int]] -> S.Set Int
getAs'Set as = foldr1 (\ s1 s2 -> S.union s1 s2) $ map (foldr (\x s -> S.insert x s) S.empty) as


getAnsList :: S.Set Int -> [Int] -> [Int]
getAnsList s = filter (flip S.notMember s)

main = do
    [n,k] <- map read . words <$> getLine :: IO[Int]
    co <- getContents
    print $ length (getAnsList (getAs'Set . getAs . lines $ co) [1..n])
