import java.util.Scanner

import scala.collection.mutable


object Main {

  def main(args: Array[String]): Unit = {

    val sc = new Scanner(System.in)
    val n = sc.nextInt() //sunuke
    val k = sc.nextInt() //okasiの数

    val store = mutable.Set.empty[Int]

    (1 to k).foreach { _ =>
      val d = sc.nextInt()
      Vector.fill(d)(sc.nextInt()).foreach(a => store += a)
    }

    println(n - store.size)

  }
}
