import java.util.ArrayList;
import java.util.Scanner;

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

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int d = 0;
        ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);
        
        for(int i = 0;i < N;i++) {
            arraylist.add(new ArrayList<Integer>());
        }

        for(int i = 0; i < (2 * K); i++){
            if(i % 2 == 0){
                d = scanner.nextInt();
            }else{
                for(int s = 0; s < d; s++){
                    arraylist.get(scanner.nextInt() - 1).add(i);
                }
            }
        }
        
        int count = 0;
        for(int i = 0;i < N;i++) {
            if(arraylist.get(i).size() == 0) {
                count += 1;
            }
        }

        System.out.println(count);
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int d = 0;
        ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);
        
        for(int i = 0;i < N;i++) {
            arraylist.add(new ArrayList<Integer>());
        }

        for(int i = 0; i < (2 * K); i++){
            if(i % 2 == 0){
                d = scanner.nextInt();
            }else{
                for(int s = 0; s < d; s++){
                    arraylist.get(scanner.nextInt() - 1).add(i);
                }
            }
        }
        
        int count = 0;
        for(int i = 0;i < N;i++) {
            if(arraylist.get(i).size() == 0) {
                count += 1;
            }
        }

        System.out.println(count);
    }
} Main public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int d = 0;
        ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);
        
        for(int i = 0;i < N;i++) {
            arraylist.add(new ArrayList<Integer>());
        }

        for(int i = 0; i < (2 * K); i++){
            if(i % 2 == 0){
                d = scanner.nextInt();
            }else{
                for(int s = 0; s < d; s++){
                    arraylist.get(scanner.nextInt() - 1).add(i);
                }
            }
        }
        
        int count = 0;
        for(int i = 0;i < N;i++) {
            if(arraylist.get(i).size() == 0) {
                count += 1;
            }
        }

        System.out.println(count);
    } main {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int d = 0;
        ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);
        
        for(int i = 0;i < N;i++) {
            arraylist.add(new ArrayList<Integer>());
        }

        for(int i = 0; i < (2 * K); i++){
            if(i % 2 == 0){
                d = scanner.nextInt();
            }else{
                for(int s = 0; s < d; s++){
                    arraylist.get(scanner.nextInt() - 1).add(i);
                }
            }
        }
        
        int count = 0;
        for(int i = 0;i < N;i++) {
            if(arraylist.get(i).size() == 0) {
                count += 1;
            }
        }

        System.out.println(count);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int K = scanner.nextInt(); K scanner.nextInt() scanner.nextInt scanner int d = 0; d 0 ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N); arraylist new ArrayList<ArrayList<Integer>>(N) for(int i = 0;i < N;i++) {
            arraylist.add(new ArrayList<Integer>());
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            arraylist.add(new ArrayList<Integer>());
        } {
            arraylist.add(new ArrayList<Integer>());
        } arraylist.add(new ArrayList<Integer>()) arraylist.add arraylist new ArrayList<Integer>() for(int i = 0; i < (2 * K); i++){
            if(i % 2 == 0){
                d = scanner.nextInt();
            }else{
                for(int s = 0; s < d; s++){
                    arraylist.get(scanner.nextInt() - 1).add(i);
                }
            }
        } int i = 0; int i = 0; i 0 i < (2 * K) i (2 * K) 2 K i++ i++ i {
            if(i % 2 == 0){
                d = scanner.nextInt();
            }else{
                for(int s = 0; s < d; s++){
                    arraylist.get(scanner.nextInt() - 1).add(i);
                }
            }
        } {
            if(i % 2 == 0){
                d = scanner.nextInt();
            }else{
                for(int s = 0; s < d; s++){
                    arraylist.get(scanner.nextInt() - 1).add(i);
                }
            }
        } if(i % 2 == 0){
                d = scanner.nextInt();
            }else{
                for(int s = 0; s < d; s++){
                    arraylist.get(scanner.nextInt() - 1).add(i);
                }
            } i % 2 == 0 i % 2 i 2 0 {
                d = scanner.nextInt();
            } d = scanner.nextInt() d scanner.nextInt() scanner.nextInt scanner {
                for(int s = 0; s < d; s++){
                    arraylist.get(scanner.nextInt() - 1).add(i);
                }
            } for(int s = 0; s < d; s++){
                    arraylist.get(scanner.nextInt() - 1).add(i);
                } int s = 0; int s = 0; s 0 s < d s d s++ s++ s {
                    arraylist.get(scanner.nextInt() - 1).add(i);
                } {
                    arraylist.get(scanner.nextInt() - 1).add(i);
                } arraylist.get(scanner.nextInt() - 1).add(i) arraylist.get(scanner.nextInt() - 1).add arraylist.get(scanner.nextInt() - 1) arraylist.get arraylist scanner.nextInt() - 1 scanner.nextInt() scanner.nextInt scanner 1 i int count = 0; count 0 for(int i = 0;i < N;i++) {
            if(arraylist.get(i).size() == 0) {
                count += 1;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if(arraylist.get(i).size() == 0) {
                count += 1;
            }
        } {
            if(arraylist.get(i).size() == 0) {
                count += 1;
            }
        } if(arraylist.get(i).size() == 0) {
                count += 1;
            } arraylist.get(i).size() == 0 arraylist.get(i).size() arraylist.get(i).size arraylist.get(i) arraylist.get arraylist i 0 {
                count += 1;
            } count += 1 count 1 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int d = 0;
        ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);
        
        for(int i = 0;i < N;i++) {
            arraylist.add(new ArrayList<Integer>());
        }

        for(int i = 0; i < (2 * K); i++){
            if(i % 2 == 0){
                d = scanner.nextInt();
            }else{
                for(int s = 0; s < d; s++){
                    arraylist.get(scanner.nextInt() - 1).add(i);
                }
            }
        }
        
        int count = 0;
        for(int i = 0;i < N;i++) {
            if(arraylist.get(i).size() == 0) {
                count += 1;
            }
        }

        System.out.println(count);
    }
} public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int d = 0;
        ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);
        
        for(int i = 0;i < N;i++) {
            arraylist.add(new ArrayList<Integer>());
        }

        for(int i = 0; i < (2 * K); i++){
            if(i % 2 == 0){
                d = scanner.nextInt();
            }else{
                for(int s = 0; s < d; s++){
                    arraylist.get(scanner.nextInt() - 1).add(i);
                }
            }
        }
        
        int count = 0;
        for(int i = 0;i < N;i++) {
            if(arraylist.get(i).size() == 0) {
                count += 1;
            }
        }

        System.out.println(count);
    }
} Main
import java.util.ArrayList;
import java.util.Scanner;

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

        int N = scanner.nextInt();
        int K = scanner.nextInt();
        int d = 0;
        ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);
        
        for(int i = 0;i < N;i++) {
            arraylist.add(new ArrayList<Integer>());
        }

        for(int i = 0; i < (2 * K); i++){
            if(i % 2 == 0){
                d = scanner.nextInt();
            }else{
                for(int s = 0; s < d; s++){
                    arraylist.get(scanner.nextInt() - 1).add(i);
                }
            }
        }
        
        int count = 0;
        for(int i = 0;i < N;i++) {
            if(arraylist.get(i).size() == 0) {
                count += 1;
            }
        }

        System.out.println(count);
    }
}