import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

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

		int N, K;

		N = sc.nextInt();
		K = sc.nextInt();
		int[] d = new int[K];

		int[][] A = new int[K][K];
		Set<Integer> set = new HashSet<Integer>();
		for (int i = 0; i < K; i++) {
			d[i] = sc.nextInt();
			for (int j = 0; j < d[i]; j++) {
				set.add(sc.nextInt());

			}
		}

		int w = N - set.size();
		System.out.println(w);

	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N, K;

		N = sc.nextInt();
		K = sc.nextInt();
		int[] d = new int[K];

		int[][] A = new int[K][K];
		Set<Integer> set = new HashSet<Integer>();
		for (int i = 0; i < K; i++) {
			d[i] = sc.nextInt();
			for (int j = 0; j < d[i]; j++) {
				set.add(sc.nextInt());

			}
		}

		int w = N - set.size();
		System.out.println(w);

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

		int N, K;

		N = sc.nextInt();
		K = sc.nextInt();
		int[] d = new int[K];

		int[][] A = new int[K][K];
		Set<Integer> set = new HashSet<Integer>();
		for (int i = 0; i < K; i++) {
			d[i] = sc.nextInt();
			for (int j = 0; j < d[i]; j++) {
				set.add(sc.nextInt());

			}
		}

		int w = N - set.size();
		System.out.println(w);

	} main {
		Scanner sc = new Scanner(System.in);

		int N, K;

		N = sc.nextInt();
		K = sc.nextInt();
		int[] d = new int[K];

		int[][] A = new int[K][K];
		Set<Integer> set = new HashSet<Integer>();
		for (int i = 0; i < K; i++) {
			d[i] = sc.nextInt();
			for (int j = 0; j < d[i]; j++) {
				set.add(sc.nextInt());

			}
		}

		int w = N - set.size();
		System.out.println(w);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N N K; K N = sc.nextInt() N sc.nextInt() sc.nextInt sc K = sc.nextInt() K sc.nextInt() sc.nextInt sc int[] d = new int[K]; d new int[K] K int[][] A = new int[K][K]; A new int[K][K] K K Set<Integer> set = new HashSet<Integer>(); set new HashSet<Integer>() for (int i = 0; i < K; i++) {
			d[i] = sc.nextInt();
			for (int j = 0; j < d[i]; j++) {
				set.add(sc.nextInt());

			}
		} int i = 0; int i = 0; i 0 i < K i K i++ i++ i {
			d[i] = sc.nextInt();
			for (int j = 0; j < d[i]; j++) {
				set.add(sc.nextInt());

			}
		} {
			d[i] = sc.nextInt();
			for (int j = 0; j < d[i]; j++) {
				set.add(sc.nextInt());

			}
		} d[i] = sc.nextInt() d[i] d i sc.nextInt() sc.nextInt sc for (int j = 0; j < d[i]; j++) {
				set.add(sc.nextInt());

			} int j = 0; int j = 0; j 0 j < d[i] j d[i] d i j++ j++ j {
				set.add(sc.nextInt());

			} {
				set.add(sc.nextInt());

			} set.add(sc.nextInt()) set.add set sc.nextInt() sc.nextInt sc int w = N - set.size(); w N - set.size() N set.size() set.size set System.out.println(w) System.out.println System.out System System.out w String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N, K;

		N = sc.nextInt();
		K = sc.nextInt();
		int[] d = new int[K];

		int[][] A = new int[K][K];
		Set<Integer> set = new HashSet<Integer>();
		for (int i = 0; i < K; i++) {
			d[i] = sc.nextInt();
			for (int j = 0; j < d[i]; j++) {
				set.add(sc.nextInt());

			}
		}

		int w = N - set.size();
		System.out.println(w);

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

		int N, K;

		N = sc.nextInt();
		K = sc.nextInt();
		int[] d = new int[K];

		int[][] A = new int[K][K];
		Set<Integer> set = new HashSet<Integer>();
		for (int i = 0; i < K; i++) {
			d[i] = sc.nextInt();
			for (int j = 0; j < d[i]; j++) {
				set.add(sc.nextInt());

			}
		}

		int w = N - set.size();
		System.out.println(w);

	}
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

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

		int N, K;

		N = sc.nextInt();
		K = sc.nextInt();
		int[] d = new int[K];

		int[][] A = new int[K][K];
		Set<Integer> set = new HashSet<Integer>();
		for (int i = 0; i < K; i++) {
			d[i] = sc.nextInt();
			for (int j = 0; j < d[i]; j++) {
				set.add(sc.nextInt());

			}
		}

		int w = N - set.size();
		System.out.println(w);

	}
}
