
fun main(args: Array<String>) {
    val (N ,K) = readLine()!!.split(" ").map(String::toInt)
    val Aii = (1..K).map {
        val dk = readLine()!!.toInt()
        readLine()!!.split(" ").map(String::toInt)
    }
    val s_map: MutableMap<Int,Int> = mutableMapOf()
    Aii.forEach { _list ->
        _list.forEach { i -> 
            s_map[i] = 1
        }
    }
(N - s_map.keys.size).run(::println)
}