import qualified Data.Set as Set
import Control.Monad

main = do
    [n, k] <- map readInt .words <$> getLine
    susukesHoldingSweet <- concat <$> (forM [1..k] $  \_ -> do
        getLine
        map readInt . words <$> getLine)
    let susukeSetHoldingSweet = Set.fromList susukesHoldingSweet
    print $ n - Set.size susukeSetHoldingSweet

readInt :: String -> Int
readInt = read