fun main(args: Array<String>) {
    val input = readLine()!!.split(" ").map { it.toInt() }

    val peopleCount = input[0]
    val trickCount = input[1]

    var havingMap = arrayOfNulls<Boolean>(peopleCount)

    repeat(trickCount) {
        val trickidex = readLine()!!.toInt()
        val having = readLine()!!.split(" ").map { it.toInt() }
        having.forEach { havingMap[it - 1] = true }
    }

    println(havingMap.count { it == null })
}