import Foundation
var str = readLine()!.components(separatedBy:" ")
var num = [Int]()
for i in str {
  num.append(Int(i)!)
}
var n = num[0]
var k = num[1]
var a = [Int]()
for j in 1...k {
  var d = Int(readLine()!)!
  var aa = readLine()!.components(separatedBy:" ")
  for l in aa {
    a.append(Int(l)!)
  }
}
let aset = Array(Set(a))
var vol = aset.count
print(n-vol)