fun main() {
    val l = readLine()!!.split(' ').map { it.toInt() }
    var map: MutableList<Int> = (1..l[0]).toMutableList()

    for (i in 0 until l[1]) {
        readLine()!!
        val a = readLine()!!.split(' ').map { it.toInt() }
        for (x in a) {
            map.remove(x)
        }
    }
    println(map.count())
}

