import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ")

let n = Int(split[0])!
let k = Int(split[1])!

var nArray = Array(repeating: 0, count: n)
var kArray: [String] = []

for _ in 0..<k {
    let input_line2: String = readLine()!
    let d = Int(input_line2)!
    
    let input_line3: String = readLine()!
    let split3: [String] = input_line3.components(separatedBy: " ")
    
    for i in 0..<d {
        kArray.append(split3[i])
    }
}

let uniqueValues = Array(Set(kArray))

let ans = nArray.count - uniqueValues.count

print(ans)