import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int K = sc.nextInt();
    int k = K;
    Set<Integer> map = new HashSet<>();

    //System.out.println(String.format("N %d  K %d ", N, K));
    while (K-- > 0) {
      int i = sc.nextInt();

      while (i-- > 0) {
        int x = sc.nextInt();
        map.add(x);
      }
    }

    //System.out.println(String.format("S = %s", map.toString()));
    Set<Integer> x = IntStream.rangeClosed(1, N).boxed().collect(Collectors.toSet());
    //System.out.println(String.format("X = %s", x.toString()));

    x.removeAll(map);
    System.out.println(x.size());
  }
} import java.util.*; util.* java import java.util.stream.Collectors; Collectors java.util.stream import java.util.stream.IntStream; IntStream java.util.stream public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int K = sc.nextInt();
    int k = K;
    Set<Integer> map = new HashSet<>();

    //System.out.println(String.format("N %d  K %d ", N, K));
    while (K-- > 0) {
      int i = sc.nextInt();

      while (i-- > 0) {
        int x = sc.nextInt();
        map.add(x);
      }
    }

    //System.out.println(String.format("S = %s", map.toString()));
    Set<Integer> x = IntStream.rangeClosed(1, N).boxed().collect(Collectors.toSet());
    //System.out.println(String.format("X = %s", x.toString()));

    x.removeAll(map);
    System.out.println(x.size());
  }
} Main public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int K = sc.nextInt();
    int k = K;
    Set<Integer> map = new HashSet<>();

    //System.out.println(String.format("N %d  K %d ", N, K));
    while (K-- > 0) {
      int i = sc.nextInt();

      while (i-- > 0) {
        int x = sc.nextInt();
        map.add(x);
      }
    }

    //System.out.println(String.format("S = %s", map.toString()));
    Set<Integer> x = IntStream.rangeClosed(1, N).boxed().collect(Collectors.toSet());
    //System.out.println(String.format("X = %s", x.toString()));

    x.removeAll(map);
    System.out.println(x.size());
  } main {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int K = sc.nextInt();
    int k = K;
    Set<Integer> map = new HashSet<>();

    //System.out.println(String.format("N %d  K %d ", N, K));
    while (K-- > 0) {
      int i = sc.nextInt();

      while (i-- > 0) {
        int x = sc.nextInt();
        map.add(x);
      }
    }

    //System.out.println(String.format("S = %s", map.toString()));
    Set<Integer> x = IntStream.rangeClosed(1, N).boxed().collect(Collectors.toSet());
    //System.out.println(String.format("X = %s", x.toString()));

    x.removeAll(map);
    System.out.println(x.size());
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc int k = K; k K Set<Integer> map = new HashSet<>(); map new HashSet<>() while (K-- > 0) {
      int i = sc.nextInt();

      while (i-- > 0) {
        int x = sc.nextInt();
        map.add(x);
      }
    } K-- > 0 K-- K 0 {
      int i = sc.nextInt();

      while (i-- > 0) {
        int x = sc.nextInt();
        map.add(x);
      }
    } int i = sc.nextInt(); i sc.nextInt() sc.nextInt sc while (i-- > 0) {
        int x = sc.nextInt();
        map.add(x);
      } i-- > 0 i-- i 0 {
        int x = sc.nextInt();
        map.add(x);
      } int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc map.add(x) map.add map x Set<Integer> x = IntStream.rangeClosed(1, N).boxed().collect(Collectors.toSet()); x IntStream.rangeClosed(1, N).boxed().collect(Collectors.toSet()) IntStream.rangeClosed(1, N).boxed().collect IntStream.rangeClosed(1, N).boxed() IntStream.rangeClosed(1, N).boxed IntStream.rangeClosed(1, N) IntStream.rangeClosed IntStream 1 N Collectors.toSet() Collectors.toSet Collectors x.removeAll(map) x.removeAll x map System.out.println(x.size()) System.out.println System.out System System.out x.size() x.size x String args[] args public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int K = sc.nextInt();
    int k = K;
    Set<Integer> map = new HashSet<>();

    //System.out.println(String.format("N %d  K %d ", N, K));
    while (K-- > 0) {
      int i = sc.nextInt();

      while (i-- > 0) {
        int x = sc.nextInt();
        map.add(x);
      }
    }

    //System.out.println(String.format("S = %s", map.toString()));
    Set<Integer> x = IntStream.rangeClosed(1, N).boxed().collect(Collectors.toSet());
    //System.out.println(String.format("X = %s", x.toString()));

    x.removeAll(map);
    System.out.println(x.size());
  }
} public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int K = sc.nextInt();
    int k = K;
    Set<Integer> map = new HashSet<>();

    //System.out.println(String.format("N %d  K %d ", N, K));
    while (K-- > 0) {
      int i = sc.nextInt();

      while (i-- > 0) {
        int x = sc.nextInt();
        map.add(x);
      }
    }

    //System.out.println(String.format("S = %s", map.toString()));
    Set<Integer> x = IntStream.rangeClosed(1, N).boxed().collect(Collectors.toSet());
    //System.out.println(String.format("X = %s", x.toString()));

    x.removeAll(map);
    System.out.println(x.size());
  }
} Main
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int K = sc.nextInt();
    int k = K;
    Set<Integer> map = new HashSet<>();

    //System.out.println(String.format("N %d  K %d ", N, K));
    while (K-- > 0) {
      int i = sc.nextInt();

      while (i-- > 0) {
        int x = sc.nextInt();
        map.add(x);
      }
    }

    //System.out.println(String.format("S = %s", map.toString()));
    Set<Integer> x = IntStream.rangeClosed(1, N).boxed().collect(Collectors.toSet());
    //System.out.println(String.format("X = %s", x.toString()));

    x.removeAll(map);
    System.out.println(x.size());
  }
}