object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val N = sc.nextInt()
  val owners = List.fill(sc.nextInt())(List.fill(sc.nextInt())(sc.nextInt()))
  println(1.to(N).toSet.diff(owners.flatten.toSet).size)
}
