fun main (args:Array<String>) {
    val (numOfSunuke , numOfCandy) = readLine()!!.split(" ").map(String::toInt)
    val haveList :MutableSet<Int> = mutableSetOf()
    for (i in 1..numOfCandy){
        val safeSunuke = readLine()!!.toInt()
        val b = readLine()!!.split(" ").map(String::toInt)
        haveList.addAll(b)

    }
    print(numOfSunuke - haveList.size)
}