fun main() {
    val(n,k) = readLine()!!.split(" ").map(String::toInt)
    var ls:MutableList<List<Int>> = mutableListOf()
    for (gomi in 1..k) {
        readLine()
        ls.add(readLine()!!.split(" ").map(String::toInt))
    }
    var ss:Set<Int> = ls.flatten().toSet()
    println(n-ss.size)
}