fun main(args: Array<String>) {
    val (N, K) = readLine()!!.split(" ").map { it.toInt() }
    val snackHolders = (0 until K).map {
        readLine() // needless value
        readLine()!!.split(" ").map { it.toInt() } }
  
    val population = snackHolders.fold(setOf<Int>(), { acc, list -> acc + list.toSet() } )
    val mischiefs = (1..N).filterNot { population.contains(it) }
    
    println(mischiefs.count())
}

