let nl = readLine()!.split(separator: " ").map { Int($0)! }
let n = nl[0], k = nl[1]
var a = [[Int]](repeating: [Int](), count: n)
for di in 1..<k+1 {
  _ = readLine()
  let nr = readLine()!.split(separator: " ").map { Int($0)! }
  for i in nr {
    a[i-1] = a[i-1] + [di]
  }
}
print(a.filter { $0.isEmpty }.count)