import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); //住人
        int K = sc.nextInt(); //菓子の種類
        ArrayList<Integer> array = new ArrayList<>();
        for(int i = 0; i < K; i++){
          int a = sc.nextInt();
          for(int j = 0; j < a; j++){
            int num = sc.nextInt();
            if(!array.contains(num))
              array.add(num);
          }
        }
        System.out.println(N-array.size());
        //System.out.println(array);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); //住人
        int K = sc.nextInt(); //菓子の種類
        ArrayList<Integer> array = new ArrayList<>();
        for(int i = 0; i < K; i++){
          int a = sc.nextInt();
          for(int j = 0; j < a; j++){
            int num = sc.nextInt();
            if(!array.contains(num))
              array.add(num);
          }
        }
        System.out.println(N-array.size());
        //System.out.println(array);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); //住人
        int K = sc.nextInt(); //菓子の種類
        ArrayList<Integer> array = new ArrayList<>();
        for(int i = 0; i < K; i++){
          int a = sc.nextInt();
          for(int j = 0; j < a; j++){
            int num = sc.nextInt();
            if(!array.contains(num))
              array.add(num);
          }
        }
        System.out.println(N-array.size());
        //System.out.println(array);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); //住人
        int K = sc.nextInt(); //菓子の種類
        ArrayList<Integer> array = new ArrayList<>();
        for(int i = 0; i < K; i++){
          int a = sc.nextInt();
          for(int j = 0; j < a; j++){
            int num = sc.nextInt();
            if(!array.contains(num))
              array.add(num);
          }
        }
        System.out.println(N-array.size());
        //System.out.println(array);
    } 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 ArrayList<Integer> array = new ArrayList<>(); array new ArrayList<>() for(int i = 0; i < K; i++){
          int a = sc.nextInt();
          for(int j = 0; j < a; j++){
            int num = sc.nextInt();
            if(!array.contains(num))
              array.add(num);
          }
        } int i = 0; int i = 0; i 0 i < K i K i++ i++ i {
          int a = sc.nextInt();
          for(int j = 0; j < a; j++){
            int num = sc.nextInt();
            if(!array.contains(num))
              array.add(num);
          }
        } {
          int a = sc.nextInt();
          for(int j = 0; j < a; j++){
            int num = sc.nextInt();
            if(!array.contains(num))
              array.add(num);
          }
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc for(int j = 0; j < a; j++){
            int num = sc.nextInt();
            if(!array.contains(num))
              array.add(num);
          } int j = 0; int j = 0; j 0 j < a j a j++ j++ j {
            int num = sc.nextInt();
            if(!array.contains(num))
              array.add(num);
          } {
            int num = sc.nextInt();
            if(!array.contains(num))
              array.add(num);
          } int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc if(!array.contains(num))
              array.add(num); !array.contains(num) array.contains(num) array.contains array num array.add(num) array.add array num System.out.println(N-array.size()) System.out.println System.out System System.out N-array.size() N array.size() array.size array 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(); //菓子の種類
        ArrayList<Integer> array = new ArrayList<>();
        for(int i = 0; i < K; i++){
          int a = sc.nextInt();
          for(int j = 0; j < a; j++){
            int num = sc.nextInt();
            if(!array.contains(num))
              array.add(num);
          }
        }
        System.out.println(N-array.size());
        //System.out.println(array);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); //住人
        int K = sc.nextInt(); //菓子の種類
        ArrayList<Integer> array = new ArrayList<>();
        for(int i = 0; i < K; i++){
          int a = sc.nextInt();
          for(int j = 0; j < a; j++){
            int num = sc.nextInt();
            if(!array.contains(num))
              array.add(num);
          }
        }
        System.out.println(N-array.size());
        //System.out.println(array);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); //住人
        int K = sc.nextInt(); //菓子の種類
        ArrayList<Integer> array = new ArrayList<>();
        for(int i = 0; i < K; i++){
          int a = sc.nextInt();
          for(int j = 0; j < a; j++){
            int num = sc.nextInt();
            if(!array.contains(num))
              array.add(num);
          }
        }
        System.out.println(N-array.size());
        //System.out.println(array);
    }
}