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

        int[] D = new int[K];
        int[] A = new int[N + 1];
        Arrays.fill(A, 0);

        int count = 0;
        for (int j = 0; j < K; j++) {
            D[j] = sc.nextInt();
            for (int i = 0; i < D[j]; i++) {
                int sunuke = sc.nextInt();
                if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                }
            }
        }
        sc.close();

        System.out.println(N - count);

    }
} import java.util.Arrays; Arrays 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();

        int[] D = new int[K];
        int[] A = new int[N + 1];
        Arrays.fill(A, 0);

        int count = 0;
        for (int j = 0; j < K; j++) {
            D[j] = sc.nextInt();
            for (int i = 0; i < D[j]; i++) {
                int sunuke = sc.nextInt();
                if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                }
            }
        }
        sc.close();

        System.out.println(N - count);

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

        int[] D = new int[K];
        int[] A = new int[N + 1];
        Arrays.fill(A, 0);

        int count = 0;
        for (int j = 0; j < K; j++) {
            D[j] = sc.nextInt();
            for (int i = 0; i < D[j]; i++) {
                int sunuke = sc.nextInt();
                if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                }
            }
        }
        sc.close();

        System.out.println(N - count);

    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();

        int[] D = new int[K];
        int[] A = new int[N + 1];
        Arrays.fill(A, 0);

        int count = 0;
        for (int j = 0; j < K; j++) {
            D[j] = sc.nextInt();
            for (int i = 0; i < D[j]; i++) {
                int sunuke = sc.nextInt();
                if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                }
            }
        }
        sc.close();

        System.out.println(N - count);

    } 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[] D = new int[K]; D new int[K] K int[] A = new int[N + 1]; A new int[N + 1] N + 1 N 1 Arrays.fill(A, 0) Arrays.fill Arrays A 0 int count = 0; count 0 for (int j = 0; j < K; j++) {
            D[j] = sc.nextInt();
            for (int i = 0; i < D[j]; i++) {
                int sunuke = sc.nextInt();
                if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                }
            }
        } int j = 0; int j = 0; j 0 j < K j K j++ j++ j {
            D[j] = sc.nextInt();
            for (int i = 0; i < D[j]; i++) {
                int sunuke = sc.nextInt();
                if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                }
            }
        } {
            D[j] = sc.nextInt();
            for (int i = 0; i < D[j]; i++) {
                int sunuke = sc.nextInt();
                if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                }
            }
        } D[j] = sc.nextInt() D[j] D j sc.nextInt() sc.nextInt sc for (int i = 0; i < D[j]; i++) {
                int sunuke = sc.nextInt();
                if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                }
            } int i = 0; int i = 0; i 0 i < D[j] i D[j] D j i++ i++ i {
                int sunuke = sc.nextInt();
                if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                }
            } {
                int sunuke = sc.nextInt();
                if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                }
            } int sunuke = sc.nextInt(); sunuke sc.nextInt() sc.nextInt sc if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                } A[sunuke] == 0 A[sunuke] A sunuke 0 {
                    A[sunuke]++;
                    count++;
                } A[sunuke]++ A[sunuke] A sunuke count++ count sc.close() sc.close sc System.out.println(N - count) System.out.println System.out System System.out N - count N count 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[] D = new int[K];
        int[] A = new int[N + 1];
        Arrays.fill(A, 0);

        int count = 0;
        for (int j = 0; j < K; j++) {
            D[j] = sc.nextInt();
            for (int i = 0; i < D[j]; i++) {
                int sunuke = sc.nextInt();
                if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                }
            }
        }
        sc.close();

        System.out.println(N - count);

    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();

        int[] D = new int[K];
        int[] A = new int[N + 1];
        Arrays.fill(A, 0);

        int count = 0;
        for (int j = 0; j < K; j++) {
            D[j] = sc.nextInt();
            for (int i = 0; i < D[j]; i++) {
                int sunuke = sc.nextInt();
                if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                }
            }
        }
        sc.close();

        System.out.println(N - count);

    }
} Main
import java.util.Arrays;
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();

        int[] D = new int[K];
        int[] A = new int[N + 1];
        Arrays.fill(A, 0);

        int count = 0;
        for (int j = 0; j < K; j++) {
            D[j] = sc.nextInt();
            for (int i = 0; i < D[j]; i++) {
                int sunuke = sc.nextInt();
                if (A[sunuke] == 0) {
                    A[sunuke]++;
                    count++;
                }
            }
        }
        sc.close();

        System.out.println(N - count);

    }
}