import java.io.*;
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int[] Nnumber = new int[N];

        for (int n = 0; n < N; n++) {
        	Nnumber[n] = 1;
        }

        int K = scan.nextInt();
        int i;

        for (i = 1; i <= K; i++) {
        	int d = scan.nextInt();
        	int j;
        	for (j = 1; j <= d; j++) {
        		int A = scan.nextInt();
        		Nnumber[A-1] = 0;
        	}
        }

        int k;
        int count = 0;
        for (k = 0; k < N; k++) {
        	if (Nnumber[k] != 0) {
        		count++;
        	}
        }

		System.out.println(count);

	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int[] Nnumber = new int[N];

        for (int n = 0; n < N; n++) {
        	Nnumber[n] = 1;
        }

        int K = scan.nextInt();
        int i;

        for (i = 1; i <= K; i++) {
        	int d = scan.nextInt();
        	int j;
        	for (j = 1; j <= d; j++) {
        		int A = scan.nextInt();
        		Nnumber[A-1] = 0;
        	}
        }

        int k;
        int count = 0;
        for (k = 0; k < N; k++) {
        	if (Nnumber[k] != 0) {
        		count++;
        	}
        }

		System.out.println(count);

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

        for (int n = 0; n < N; n++) {
        	Nnumber[n] = 1;
        }

        int K = scan.nextInt();
        int i;

        for (i = 1; i <= K; i++) {
        	int d = scan.nextInt();
        	int j;
        	for (j = 1; j <= d; j++) {
        		int A = scan.nextInt();
        		Nnumber[A-1] = 0;
        	}
        }

        int k;
        int count = 0;
        for (k = 0; k < N; k++) {
        	if (Nnumber[k] != 0) {
        		count++;
        	}
        }

		System.out.println(count);

	} main {
		Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int[] Nnumber = new int[N];

        for (int n = 0; n < N; n++) {
        	Nnumber[n] = 1;
        }

        int K = scan.nextInt();
        int i;

        for (i = 1; i <= K; i++) {
        	int d = scan.nextInt();
        	int j;
        	for (j = 1; j <= d; j++) {
        		int A = scan.nextInt();
        		Nnumber[A-1] = 0;
        	}
        }

        int k;
        int count = 0;
        for (k = 0; k < N; k++) {
        	if (Nnumber[k] != 0) {
        		count++;
        	}
        }

		System.out.println(count);

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int[] Nnumber = new int[N]; Nnumber new int[N] N for (int n = 0; n < N; n++) {
        	Nnumber[n] = 1;
        } int n = 0; int n = 0; n 0 n < N n N n++ n++ n {
        	Nnumber[n] = 1;
        } {
        	Nnumber[n] = 1;
        } Nnumber[n] = 1 Nnumber[n] Nnumber n 1 int K = scan.nextInt(); K scan.nextInt() scan.nextInt scan int i; i for (i = 1; i <= K; i++) {
        	int d = scan.nextInt();
        	int j;
        	for (j = 1; j <= d; j++) {
        		int A = scan.nextInt();
        		Nnumber[A-1] = 0;
        	}
        } i = 1; i = 1 i 1 i <= K i K i++ i++ i {
        	int d = scan.nextInt();
        	int j;
        	for (j = 1; j <= d; j++) {
        		int A = scan.nextInt();
        		Nnumber[A-1] = 0;
        	}
        } {
        	int d = scan.nextInt();
        	int j;
        	for (j = 1; j <= d; j++) {
        		int A = scan.nextInt();
        		Nnumber[A-1] = 0;
        	}
        } int d = scan.nextInt(); d scan.nextInt() scan.nextInt scan int j; j for (j = 1; j <= d; j++) {
        		int A = scan.nextInt();
        		Nnumber[A-1] = 0;
        	} j = 1; j = 1 j 1 j <= d j d j++ j++ j {
        		int A = scan.nextInt();
        		Nnumber[A-1] = 0;
        	} {
        		int A = scan.nextInt();
        		Nnumber[A-1] = 0;
        	} int A = scan.nextInt(); A scan.nextInt() scan.nextInt scan Nnumber[A-1] = 0 Nnumber[A-1] Nnumber A-1 A 1 0 int k; k int count = 0; count 0 for (k = 0; k < N; k++) {
        	if (Nnumber[k] != 0) {
        		count++;
        	}
        } k = 0; k = 0 k 0 k < N k N k++ k++ k {
        	if (Nnumber[k] != 0) {
        		count++;
        	}
        } {
        	if (Nnumber[k] != 0) {
        		count++;
        	}
        } if (Nnumber[k] != 0) {
        		count++;
        	} Nnumber[k] != 0 Nnumber[k] Nnumber k 0 {
        		count++;
        	} count++ count 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 scan = new Scanner(System.in);
        int N = scan.nextInt();
        int[] Nnumber = new int[N];

        for (int n = 0; n < N; n++) {
        	Nnumber[n] = 1;
        }

        int K = scan.nextInt();
        int i;

        for (i = 1; i <= K; i++) {
        	int d = scan.nextInt();
        	int j;
        	for (j = 1; j <= d; j++) {
        		int A = scan.nextInt();
        		Nnumber[A-1] = 0;
        	}
        }

        int k;
        int count = 0;
        for (k = 0; k < N; k++) {
        	if (Nnumber[k] != 0) {
        		count++;
        	}
        }

		System.out.println(count);

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

        for (int n = 0; n < N; n++) {
        	Nnumber[n] = 1;
        }

        int K = scan.nextInt();
        int i;

        for (i = 1; i <= K; i++) {
        	int d = scan.nextInt();
        	int j;
        	for (j = 1; j <= d; j++) {
        		int A = scan.nextInt();
        		Nnumber[A-1] = 0;
        	}
        }

        int k;
        int count = 0;
        for (k = 0; k < N; k++) {
        	if (Nnumber[k] != 0) {
        		count++;
        	}
        }

		System.out.println(count);

	}
} Main
import java.io.*;
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int[] Nnumber = new int[N];

        for (int n = 0; n < N; n++) {
        	Nnumber[n] = 1;
        }

        int K = scan.nextInt();
        int i;

        for (i = 1; i <= K; i++) {
        	int d = scan.nextInt();
        	int j;
        	for (j = 1; j <= d; j++) {
        		int A = scan.nextInt();
        		Nnumber[A-1] = 0;
        	}
        }

        int k;
        int count = 0;
        for (k = 0; k < N; k++) {
        	if (Nnumber[k] != 0) {
        		count++;
        	}
        }

		System.out.println(count);

	}
}