Scanf.scanf "%d %d" (fun n k ->
    let snuke = Array.make n false in
    for i = 1 to k do
        Scanf.scanf " %d" (fun d ->
            for j = 1 to d do
                Scanf.scanf " %d" (fun a -> snuke.(a - 1) <- true)
            done
        )
    done;
    Array.fold_left (fun acc v -> if v then acc else acc + 1) 0 snuke |> Printf.printf "%d\n"
)