fun main() {
    val (n, k) = readLine()!!.split(" ").map(String::toInt)
    val numbers = mutableSetOf<Int>()
    (0 until k).map {
        val d = readLine()!!.toInt()
        val num = readLine()!!.split(" ").map(String::toInt)
        numbers.addAll(num)
    }

    println(n - numbers.size)
}