import scala.io.StdIn.readLine
import scala.io.StdIn.readInt

object Main extends App {
    val nk = readLine.split(" ").map(x => x.toInt);
    val n = nk(0)
    val k = nk(1)
    val count = Array.fill(n){0}
    for(i <- 1 to k) {
        val o = readLine
        val arr = readLine.split(" ").map(_.toInt)
        for(x <- arr) {
            count(x-1)=1
        }
    }
    val ans = n-count.sum
    print(ans)
}