import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String[] lineString = sc.nextLine().split(" ");
		int[] sunuke = new int[Integer.parseInt(lineString[0])];
		int numberOfCandy = Integer.parseInt(lineString[1]);

		int noCandyCount = sunuke.length;
		for (int candy = 0; candy < numberOfCandy; candy++) {
			int hasCandy = Integer.parseInt(sc.nextLine());
			lineString = sc.nextLine().split(" ");
			while (hasCandy-- > 0) {
				if (sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0) {
					noCandyCount--;
				}
				sunuke[Integer.parseInt(lineString[hasCandy]) - 1]++;
			}
		}

		// 出力
		System.out.println(noCandyCount);
		sc.close();
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String[] lineString = sc.nextLine().split(" ");
		int[] sunuke = new int[Integer.parseInt(lineString[0])];
		int numberOfCandy = Integer.parseInt(lineString[1]);

		int noCandyCount = sunuke.length;
		for (int candy = 0; candy < numberOfCandy; candy++) {
			int hasCandy = Integer.parseInt(sc.nextLine());
			lineString = sc.nextLine().split(" ");
			while (hasCandy-- > 0) {
				if (sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0) {
					noCandyCount--;
				}
				sunuke[Integer.parseInt(lineString[hasCandy]) - 1]++;
			}
		}

		// 出力
		System.out.println(noCandyCount);
		sc.close();
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String[] lineString = sc.nextLine().split(" ");
		int[] sunuke = new int[Integer.parseInt(lineString[0])];
		int numberOfCandy = Integer.parseInt(lineString[1]);

		int noCandyCount = sunuke.length;
		for (int candy = 0; candy < numberOfCandy; candy++) {
			int hasCandy = Integer.parseInt(sc.nextLine());
			lineString = sc.nextLine().split(" ");
			while (hasCandy-- > 0) {
				if (sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0) {
					noCandyCount--;
				}
				sunuke[Integer.parseInt(lineString[hasCandy]) - 1]++;
			}
		}

		// 出力
		System.out.println(noCandyCount);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String[] lineString = sc.nextLine().split(" ");
		int[] sunuke = new int[Integer.parseInt(lineString[0])];
		int numberOfCandy = Integer.parseInt(lineString[1]);

		int noCandyCount = sunuke.length;
		for (int candy = 0; candy < numberOfCandy; candy++) {
			int hasCandy = Integer.parseInt(sc.nextLine());
			lineString = sc.nextLine().split(" ");
			while (hasCandy-- > 0) {
				if (sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0) {
					noCandyCount--;
				}
				sunuke[Integer.parseInt(lineString[hasCandy]) - 1]++;
			}
		}

		// 出力
		System.out.println(noCandyCount);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] lineString = sc.nextLine().split(" "); lineString sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int[] sunuke = new int[Integer.parseInt(lineString[0])]; sunuke new int[Integer.parseInt(lineString[0])] Integer.parseInt(lineString[0]) Integer.parseInt Integer lineString[0] lineString 0 int numberOfCandy = Integer.parseInt(lineString[1]); numberOfCandy Integer.parseInt(lineString[1]) Integer.parseInt Integer lineString[1] lineString 1 int noCandyCount = sunuke.length; noCandyCount sunuke.length sunuke sunuke.length for (int candy = 0; candy < numberOfCandy; candy++) {
			int hasCandy = Integer.parseInt(sc.nextLine());
			lineString = sc.nextLine().split(" ");
			while (hasCandy-- > 0) {
				if (sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0) {
					noCandyCount--;
				}
				sunuke[Integer.parseInt(lineString[hasCandy]) - 1]++;
			}
		} int candy = 0; int candy = 0; candy 0 candy < numberOfCandy candy numberOfCandy candy++ candy++ candy {
			int hasCandy = Integer.parseInt(sc.nextLine());
			lineString = sc.nextLine().split(" ");
			while (hasCandy-- > 0) {
				if (sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0) {
					noCandyCount--;
				}
				sunuke[Integer.parseInt(lineString[hasCandy]) - 1]++;
			}
		} {
			int hasCandy = Integer.parseInt(sc.nextLine());
			lineString = sc.nextLine().split(" ");
			while (hasCandy-- > 0) {
				if (sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0) {
					noCandyCount--;
				}
				sunuke[Integer.parseInt(lineString[hasCandy]) - 1]++;
			}
		} int hasCandy = Integer.parseInt(sc.nextLine()); hasCandy Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc lineString = sc.nextLine().split(" ") lineString sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " while (hasCandy-- > 0) {
				if (sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0) {
					noCandyCount--;
				}
				sunuke[Integer.parseInt(lineString[hasCandy]) - 1]++;
			} hasCandy-- > 0 hasCandy-- hasCandy 0 {
				if (sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0) {
					noCandyCount--;
				}
				sunuke[Integer.parseInt(lineString[hasCandy]) - 1]++;
			} if (sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0) {
					noCandyCount--;
				} sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0 sunuke[Integer.parseInt(lineString[hasCandy]) - 1] sunuke Integer.parseInt(lineString[hasCandy]) - 1 Integer.parseInt(lineString[hasCandy]) Integer.parseInt Integer lineString[hasCandy] lineString hasCandy 1 0 {
					noCandyCount--;
				} noCandyCount-- noCandyCount sunuke[Integer.parseInt(lineString[hasCandy]) - 1]++ sunuke[Integer.parseInt(lineString[hasCandy]) - 1] sunuke Integer.parseInt(lineString[hasCandy]) - 1 Integer.parseInt(lineString[hasCandy]) Integer.parseInt Integer lineString[hasCandy] lineString hasCandy 1 System.out.println(noCandyCount) System.out.println System.out System System.out noCandyCount sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String[] lineString = sc.nextLine().split(" ");
		int[] sunuke = new int[Integer.parseInt(lineString[0])];
		int numberOfCandy = Integer.parseInt(lineString[1]);

		int noCandyCount = sunuke.length;
		for (int candy = 0; candy < numberOfCandy; candy++) {
			int hasCandy = Integer.parseInt(sc.nextLine());
			lineString = sc.nextLine().split(" ");
			while (hasCandy-- > 0) {
				if (sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0) {
					noCandyCount--;
				}
				sunuke[Integer.parseInt(lineString[hasCandy]) - 1]++;
			}
		}

		// 出力
		System.out.println(noCandyCount);
		sc.close();
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String[] lineString = sc.nextLine().split(" ");
		int[] sunuke = new int[Integer.parseInt(lineString[0])];
		int numberOfCandy = Integer.parseInt(lineString[1]);

		int noCandyCount = sunuke.length;
		for (int candy = 0; candy < numberOfCandy; candy++) {
			int hasCandy = Integer.parseInt(sc.nextLine());
			lineString = sc.nextLine().split(" ");
			while (hasCandy-- > 0) {
				if (sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0) {
					noCandyCount--;
				}
				sunuke[Integer.parseInt(lineString[hasCandy]) - 1]++;
			}
		}

		// 出力
		System.out.println(noCandyCount);
		sc.close();
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String[] lineString = sc.nextLine().split(" ");
		int[] sunuke = new int[Integer.parseInt(lineString[0])];
		int numberOfCandy = Integer.parseInt(lineString[1]);

		int noCandyCount = sunuke.length;
		for (int candy = 0; candy < numberOfCandy; candy++) {
			int hasCandy = Integer.parseInt(sc.nextLine());
			lineString = sc.nextLine().split(" ");
			while (hasCandy-- > 0) {
				if (sunuke[Integer.parseInt(lineString[hasCandy]) - 1] == 0) {
					noCandyCount--;
				}
				sunuke[Integer.parseInt(lineString[hasCandy]) - 1]++;
			}
		}

		// 出力
		System.out.println(noCandyCount);
		sc.close();
	}
}
