import java.util.*
import kotlin.collections.HashSet

fun main() {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val k = sc.nextInt()
    val s = HashSet<Int>()

    for(i in 0 until k) {
        val d = sc.nextInt()
        for(j in 0 until d) {
            s.add(sc.nextInt())
        }
    }

    print(n - s.size)


}