fun main() {
    val (n,k) = readLine()!!.split(" ").map(String::toInt)

    val a = Array(k){
        readLine()!!
        readLine()!!.split(" ").map(String::toInt)
    }

    var sum = 0

    for(i in 1 .. n){

        if( !a.any { it.any { it == i } }){
            sum += 1;
        }

    }

    println("$sum")

}