import Foundation

let nk = readLine()!.split(separator:" ").map{Int($0)!}
var sets: Set<Int> = []
for _ in 1...nk[1] - 1{
  let _ = readLine()!
  let A = readLine()!.split(separator:" ").map{Int($0)!}
  for i in A{
  sets.insert(i)
  }
}
print(nk[0] - sets.count)