open Printf
open Scanf

let id x = x

let solve n k =
  let ht = Hashtbl.create n in
  for i = 1 to k do
    let d = scanf "%d " id in
    for j = 1 to d do
      scanf "%d " @@ fun x -> Hashtbl.replace ht x true
    done
  done;
  n - Hashtbl.length ht

let () =
  scanf "%d %d " solve |> printf "%d\n"
