fun main() {
    val (n, k) = readLine()!!.split(" ").map(String::toInt)
    val sunuke = mutableSetOf<Int>()
    repeat(k) {
        readLine()!!
        sunuke.addAll(readLine()!!.split(" ").map(String::toInt))
    }

    println(n - sunuke.size)
}



