import java.util.*

fun main(args: Array<String>) {
  val sc = Scanner(System.`in`)
  val n = sc.nextInt()
  val k = sc.nextInt()
  val aList = mutableListOf<List<Int>>()
  for (i in 1..k) {
    val d = sc.nextInt()
    val a = (1..d).map {
      sc.nextInt()
    }
    aList.add(a)
  }

  println(abc166b(n, k, aList))
}

private fun abc166b(n: Int, k: Int, a: List<List<Int>>): Int {
  val hasTreat = mutableSetOf<Int>()
  for (ai in a) {
    for (aii in ai) {
      hasTreat.add(aii)
    }
  }
  var ans = n - hasTreat.size
  return ans
}
