fun main() {
	val (n,k) = readLine()!!.split(" ").map {it.toInt()}
	var a = (1..n).toMutableSet()
	for(i in 1..k) {
		readLine()
		readLine()!!.split(" ").map {it.toInt()}.forEach {a.remove(it)}
	}
	println(a.size)
}
