fun main() {
    println(solve())
}

val solve: () -> Any = {
    val (N,K) = readIntList()
    val set = (1..N).toList().toMutableSet()
    repeat(K) {
        val d = readInt()
        val A = readIntList()
        set -= A
    }
    set.size
}

val mod: Int = 1_000_000_007

fun readString() = readLine()!!
fun readInt() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readStringList() = readLine()!!.split(" ")
fun readIntList() = readLine()!!.split(" ").map(String::toInt)
fun readLongList() = readLine()!!.split(" ").map(String::toLong)

fun <T> T.alsoPrintln() = also { println(this) }

fun Boolean.toYesOrNo(yes: String = "Yes", no: String = "No") = if (this) yes else no