fun main(args: Array<String>){
    val (n,k) = nextIntList()

    val sunukeS = arrayOfNulls<Boolean>(n)

    fun checkO(){
        val d = next().toInt()
        val aS = nextIntList()
        aS.forEach {
            sunukeS[it - 1] = true
        }
    }

    for(i in 1..k){
        checkO()
    }

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

}
fun next() = readLine()!!
fun nextIntList() = next().split(" ").map{ it.toInt() }