let nk = readLine()!.split(separator: " ").map { Int($0)! }
let n = nk[0], k = nk[1]

var arr: [Int] = []
for _ in 0..<k {
  let _ = readLine()!
  let a = readLine()!.split(separator: " ").map { Int($0)! }
  arr.append(contentsOf: a)
}
print(n - Set(arr).count)