import scala.io.StdIn

object Main extends App {
  val Array(n, k) = StdIn.readLine().split(" ").map(_.toInt)
  var snukes = (1 to n).toList
  for (_ <- 0 until k) {
    val d = StdIn.readInt()
    val a = StdIn.readLine().split(" ").map(_.toInt)
    snukes = snukes.filterNot(a.contains)
  }
  println(snukes.size)
}