import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        Map<Integer, Boolean> list = new HashMap<>();
        for (int i = 1; i <=N+1; i++) {
            list.put(i, true);
        }
        for (int i = 0; i < K; i++) {
            int d = sc.nextInt();
            for(int j = 0;j<d;j++){
                int A = sc.nextInt();
                if(list.get(A)){
                    list.put(A,false);
                }
            }

                }





        int ans = 0;
        for (int i = 1; i <+ N+1; i++) {
            if(list.get(i)){
                ans++;
            }
        }
        System.out.println(ans);
    }

}
 import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner 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();
        Map<Integer, Boolean> list = new HashMap<>();
        for (int i = 1; i <=N+1; i++) {
            list.put(i, true);
        }
        for (int i = 0; i < K; i++) {
            int d = sc.nextInt();
            for(int j = 0;j<d;j++){
                int A = sc.nextInt();
                if(list.get(A)){
                    list.put(A,false);
                }
            }

                }





        int ans = 0;
        for (int i = 1; i <+ N+1; i++) {
            if(list.get(i)){
                ans++;
            }
        }
        System.out.println(ans);
    }

} Main public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        Map<Integer, Boolean> list = new HashMap<>();
        for (int i = 1; i <=N+1; i++) {
            list.put(i, true);
        }
        for (int i = 0; i < K; i++) {
            int d = sc.nextInt();
            for(int j = 0;j<d;j++){
                int A = sc.nextInt();
                if(list.get(A)){
                    list.put(A,false);
                }
            }

                }





        int ans = 0;
        for (int i = 1; i <+ N+1; i++) {
            if(list.get(i)){
                ans++;
            }
        }
        System.out.println(ans);
    } main {


        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        Map<Integer, Boolean> list = new HashMap<>();
        for (int i = 1; i <=N+1; i++) {
            list.put(i, true);
        }
        for (int i = 0; i < K; i++) {
            int d = sc.nextInt();
            for(int j = 0;j<d;j++){
                int A = sc.nextInt();
                if(list.get(A)){
                    list.put(A,false);
                }
            }

                }





        int ans = 0;
        for (int i = 1; i <+ N+1; i++) {
            if(list.get(i)){
                ans++;
            }
        }
        System.out.println(ans);
    } 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 Map<Integer, Boolean> list = new HashMap<>(); list new HashMap<>() for (int i = 1; i <=N+1; i++) {
            list.put(i, true);
        } int i = 1; int i = 1; i 1 i <=N+1 i N+1 N 1 i++ i++ i {
            list.put(i, true);
        } {
            list.put(i, true);
        } list.put(i, true) list.put list i true for (int i = 0; i < K; i++) {
            int d = sc.nextInt();
            for(int j = 0;j<d;j++){
                int A = sc.nextInt();
                if(list.get(A)){
                    list.put(A,false);
                }
            }

                } int i = 0; int i = 0; i 0 i < K i K i++ i++ i {
            int d = sc.nextInt();
            for(int j = 0;j<d;j++){
                int A = sc.nextInt();
                if(list.get(A)){
                    list.put(A,false);
                }
            }

                } {
            int d = sc.nextInt();
            for(int j = 0;j<d;j++){
                int A = sc.nextInt();
                if(list.get(A)){
                    list.put(A,false);
                }
            }

                } int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc for(int j = 0;j<d;j++){
                int A = sc.nextInt();
                if(list.get(A)){
                    list.put(A,false);
                }
            } int j = 0; int j = 0; j 0 j<d j d j++ j++ j {
                int A = sc.nextInt();
                if(list.get(A)){
                    list.put(A,false);
                }
            } {
                int A = sc.nextInt();
                if(list.get(A)){
                    list.put(A,false);
                }
            } int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc if(list.get(A)){
                    list.put(A,false);
                } list.get(A) list.get list A {
                    list.put(A,false);
                } list.put(A,false) list.put list A false int ans = 0; ans 0 for (int i = 1; i <+ N+1; i++) {
            if(list.get(i)){
                ans++;
            }
        } int i = 1; int i = 1; i 1 i <+ N+1 i + N+1 + N N 1 i++ i++ i {
            if(list.get(i)){
                ans++;
            }
        } {
            if(list.get(i)){
                ans++;
            }
        } if(list.get(i)){
                ans++;
            } list.get(i) list.get list i {
                ans++;
            } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans 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();
        Map<Integer, Boolean> list = new HashMap<>();
        for (int i = 1; i <=N+1; i++) {
            list.put(i, true);
        }
        for (int i = 0; i < K; i++) {
            int d = sc.nextInt();
            for(int j = 0;j<d;j++){
                int A = sc.nextInt();
                if(list.get(A)){
                    list.put(A,false);
                }
            }

                }





        int ans = 0;
        for (int i = 1; i <+ N+1; i++) {
            if(list.get(i)){
                ans++;
            }
        }
        System.out.println(ans);
    }

} public class Main {

    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        Map<Integer, Boolean> list = new HashMap<>();
        for (int i = 1; i <=N+1; i++) {
            list.put(i, true);
        }
        for (int i = 0; i < K; i++) {
            int d = sc.nextInt();
            for(int j = 0;j<d;j++){
                int A = sc.nextInt();
                if(list.get(A)){
                    list.put(A,false);
                }
            }

                }





        int ans = 0;
        for (int i = 1; i <+ N+1; i++) {
            if(list.get(i)){
                ans++;
            }
        }
        System.out.println(ans);
    }

} Main
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        Map<Integer, Boolean> list = new HashMap<>();
        for (int i = 1; i <=N+1; i++) {
            list.put(i, true);
        }
        for (int i = 0; i < K; i++) {
            int d = sc.nextInt();
            for(int j = 0;j<d;j++){
                int A = sc.nextInt();
                if(list.get(A)){
                    list.put(A,false);
                }
            }

                }





        int ans = 0;
        for (int i = 1; i <+ N+1; i++) {
            if(list.get(i)){
                ans++;
            }
        }
        System.out.println(ans);
    }

}

