fun main(args: Array<String>) {
    val (n, k) = readLine()!!.split(" ").map { it.toInt() }
    val snackHolders = hashSetOf<String>()
    for (i in 0 until k) {
        readLine()
        snackHolders.addAll(readLine()!!.split(" "))
    }
    println(n - snackHolders.size)
}