fun main(args : Array<String>) {
    val (n, k) = readLine()!!.split(" ").map { it.toInt() }
    val ss = IntArray(n) {0}

    repeat(k) {
        val d = readLine()!!.toInt()
        readLine()!!.split(" ").map { it.toInt()-1 }.forEach {
            ss[it]++
        }
    }

    println(ss.count { it == 0 })
}