let inp = readLine()!.split(separator: " ").map { Int($0)! }
let (N, K) = (inp[0], inp[1])
let As = (1...K).map { _ -> [Int] in
    _ = readLine()
    return readLine()!.split(separator: " ").map { Int($0)! }
}

print(N - Set(As.flatMap{$0}).count)

