import Foundation

let arr=readLine()!.split{$0==" "}.map{Int(String($0))!}
var n=arr[0]
var k=arr[1]
var count:[Int] = []
var count2:[Int] = []

for i in 1...n {
    count.append(i)
}
for _ in 0..<k {
    let d = Int(readLine()!)!
    let j=readLine()!.split{$0==" "}.map{Int(String($0))!}
    for i in 0..<d {
        count2.append(j[i])
    }
}
let result = count2.reduce([], { $0.contains($1) ? $0 : $0 + [$1] })
print(count.count - result.count)