import java.util.HashMap;
import java.util.Map;
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();


        Map<Integer, Boolean> map = new HashMap<>();

        for (int i = 0; i < N; i++) {
            map.put(i + 1, false);
        }

        for (int j = 0; j < K; j++) {
            int d = scanner.nextInt();
            for (int i = 0; i < d; i++) {
                map.put(scanner.nextInt(), true);
            }
        }

        int result = 0;
        for (Integer integer : map.keySet()) {
            if (map.get(integer).equals(false)) {
                result += 1;
            }
        }

        System.out.println(result);
    }
} 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 scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();


        Map<Integer, Boolean> map = new HashMap<>();

        for (int i = 0; i < N; i++) {
            map.put(i + 1, false);
        }

        for (int j = 0; j < K; j++) {
            int d = scanner.nextInt();
            for (int i = 0; i < d; i++) {
                map.put(scanner.nextInt(), true);
            }
        }

        int result = 0;
        for (Integer integer : map.keySet()) {
            if (map.get(integer).equals(false)) {
                result += 1;
            }
        }

        System.out.println(result);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();


        Map<Integer, Boolean> map = new HashMap<>();

        for (int i = 0; i < N; i++) {
            map.put(i + 1, false);
        }

        for (int j = 0; j < K; j++) {
            int d = scanner.nextInt();
            for (int i = 0; i < d; i++) {
                map.put(scanner.nextInt(), true);
            }
        }

        int result = 0;
        for (Integer integer : map.keySet()) {
            if (map.get(integer).equals(false)) {
                result += 1;
            }
        }

        System.out.println(result);
    } main {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();


        Map<Integer, Boolean> map = new HashMap<>();

        for (int i = 0; i < N; i++) {
            map.put(i + 1, false);
        }

        for (int j = 0; j < K; j++) {
            int d = scanner.nextInt();
            for (int i = 0; i < d; i++) {
                map.put(scanner.nextInt(), true);
            }
        }

        int result = 0;
        for (Integer integer : map.keySet()) {
            if (map.get(integer).equals(false)) {
                result += 1;
            }
        }

        System.out.println(result);
    } 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 Map<Integer, Boolean> map = new HashMap<>(); map new HashMap<>() for (int i = 0; i < N; i++) {
            map.put(i + 1, false);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            map.put(i + 1, false);
        } {
            map.put(i + 1, false);
        } map.put(i + 1, false) map.put map i + 1 i 1 false for (int j = 0; j < K; j++) {
            int d = scanner.nextInt();
            for (int i = 0; i < d; i++) {
                map.put(scanner.nextInt(), true);
            }
        } int j = 0; int j = 0; j 0 j < K j K j++ j++ j {
            int d = scanner.nextInt();
            for (int i = 0; i < d; i++) {
                map.put(scanner.nextInt(), true);
            }
        } {
            int d = scanner.nextInt();
            for (int i = 0; i < d; i++) {
                map.put(scanner.nextInt(), true);
            }
        } int d = scanner.nextInt(); d scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < d; i++) {
                map.put(scanner.nextInt(), true);
            } int i = 0; int i = 0; i 0 i < d i d i++ i++ i {
                map.put(scanner.nextInt(), true);
            } {
                map.put(scanner.nextInt(), true);
            } map.put(scanner.nextInt(), true) map.put map scanner.nextInt() scanner.nextInt scanner true int result = 0; result 0 for (Integer integer : map.keySet()) {
            if (map.get(integer).equals(false)) {
                result += 1;
            }
        } Integer integer map.keySet() map.keySet map {
            if (map.get(integer).equals(false)) {
                result += 1;
            }
        } {
            if (map.get(integer).equals(false)) {
                result += 1;
            }
        } if (map.get(integer).equals(false)) {
                result += 1;
            } map.get(integer).equals(false) map.get(integer).equals map.get(integer) map.get map integer false {
                result += 1;
            } result += 1 result 1 System.out.println(result) System.out.println System.out System System.out result 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();


        Map<Integer, Boolean> map = new HashMap<>();

        for (int i = 0; i < N; i++) {
            map.put(i + 1, false);
        }

        for (int j = 0; j < K; j++) {
            int d = scanner.nextInt();
            for (int i = 0; i < d; i++) {
                map.put(scanner.nextInt(), true);
            }
        }

        int result = 0;
        for (Integer integer : map.keySet()) {
            if (map.get(integer).equals(false)) {
                result += 1;
            }
        }

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


        Map<Integer, Boolean> map = new HashMap<>();

        for (int i = 0; i < N; i++) {
            map.put(i + 1, false);
        }

        for (int j = 0; j < K; j++) {
            int d = scanner.nextInt();
            for (int i = 0; i < d; i++) {
                map.put(scanner.nextInt(), true);
            }
        }

        int result = 0;
        for (Integer integer : map.keySet()) {
            if (map.get(integer).equals(false)) {
                result += 1;
            }
        }

        System.out.println(result);
    }
} Main
import java.util.HashMap;
import java.util.Map;
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();


        Map<Integer, Boolean> map = new HashMap<>();

        for (int i = 0; i < N; i++) {
            map.put(i + 1, false);
        }

        for (int j = 0; j < K; j++) {
            int d = scanner.nextInt();
            for (int i = 0; i < d; i++) {
                map.put(scanner.nextInt(), true);
            }
        }

        int result = 0;
        for (Integer integer : map.keySet()) {
            if (map.get(integer).equals(false)) {
                result += 1;
            }
        }

        System.out.println(result);
    }
}