object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val Array(datN, datK) = readLine.split(" ").map(_.toInt)
    val datA = for(i <- 1 to datK) yield {
      readLine
      readLine.split(" ").map(_.toInt)
    }

    val tableA = for(i <- 1 to datN) yield i
    val ans = tableA.map(e => (e, datA.flatMap(x => x).contains(e))).filter(e => e._2 == false).length

    println(ans)
  }
}
