import java.util.*;
import java.io.*;
import java.nio.charset.StandardCharsets;

public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int K = Integer.parseInt(tokens[1]);

		int[] d = new int[K];
		List<Integer>[] A = new List[K];
		for (int i = 0; i < K; ++i) {
			d[i] = Integer.parseInt(in.readLine());
			tokens = in.readLine().split(" ");
			List<Integer> list = new ArrayList<>();
			for (int j = 0; j < d[i]; ++j) {
				list.add(Integer.parseInt(tokens[j]));
			}
			A[i] = list;
		}

		Set<Integer> set = new HashSet<>();
		for (int i = 1; i <= N; ++i) {
			set.add(i);
		}
		for (List<Integer> list : A) {
			for (int j = 0; j < list.size(); ++j) {
				set.remove(list.get(j));
			}
		}
		System.out.println(set.size());
	}

	void calc() {
	}

	void showResult() {
	}

} import java.util.*; util.* java import java.io.*; io.* java import java.nio.charset.StandardCharsets; StandardCharsets java.nio.charset public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int K = Integer.parseInt(tokens[1]);

		int[] d = new int[K];
		List<Integer>[] A = new List[K];
		for (int i = 0; i < K; ++i) {
			d[i] = Integer.parseInt(in.readLine());
			tokens = in.readLine().split(" ");
			List<Integer> list = new ArrayList<>();
			for (int j = 0; j < d[i]; ++j) {
				list.add(Integer.parseInt(tokens[j]));
			}
			A[i] = list;
		}

		Set<Integer> set = new HashSet<>();
		for (int i = 1; i <= N; ++i) {
			set.add(i);
		}
		for (List<Integer> list : A) {
			for (int j = 0; j < list.size(); ++j) {
				set.remove(list.get(j));
			}
		}
		System.out.println(set.size());
	}

	void calc() {
	}

	void showResult() {
	}

} Main public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	} main {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	} InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8); reader new InputStreamReader(System.in, StandardCharsets.UTF_8) BufferedReader in = new BufferedReader(reader); in new BufferedReader(reader) Main ins = new Main(in); ins new Main(in) ins.calc() ins.calc ins ins.showResult() ins.showResult ins String[] args args Main(BufferedReader in) throws IOException {
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int K = Integer.parseInt(tokens[1]);

		int[] d = new int[K];
		List<Integer>[] A = new List[K];
		for (int i = 0; i < K; ++i) {
			d[i] = Integer.parseInt(in.readLine());
			tokens = in.readLine().split(" ");
			List<Integer> list = new ArrayList<>();
			for (int j = 0; j < d[i]; ++j) {
				list.add(Integer.parseInt(tokens[j]));
			}
			A[i] = list;
		}

		Set<Integer> set = new HashSet<>();
		for (int i = 1; i <= N; ++i) {
			set.add(i);
		}
		for (List<Integer> list : A) {
			for (int j = 0; j < list.size(); ++j) {
				set.remove(list.get(j));
			}
		}
		System.out.println(set.size());
	} Main {
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int K = Integer.parseInt(tokens[1]);

		int[] d = new int[K];
		List<Integer>[] A = new List[K];
		for (int i = 0; i < K; ++i) {
			d[i] = Integer.parseInt(in.readLine());
			tokens = in.readLine().split(" ");
			List<Integer> list = new ArrayList<>();
			for (int j = 0; j < d[i]; ++j) {
				list.add(Integer.parseInt(tokens[j]));
			}
			A[i] = list;
		}

		Set<Integer> set = new HashSet<>();
		for (int i = 1; i <= N; ++i) {
			set.add(i);
		}
		for (List<Integer> list : A) {
			for (int j = 0; j < list.size(); ++j) {
				set.remove(list.get(j));
			}
		}
		System.out.println(set.size());
	} String[] tokens = in.readLine().split(" "); tokens in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int N = Integer.parseInt(tokens[0]); N Integer.parseInt(tokens[0]) Integer.parseInt Integer tokens[0] tokens 0 int K = Integer.parseInt(tokens[1]); K Integer.parseInt(tokens[1]) Integer.parseInt Integer tokens[1] tokens 1 int[] d = new int[K]; d new int[K] K List<Integer>[] A = new List[K]; A new List[K] K for (int i = 0; i < K; ++i) {
			d[i] = Integer.parseInt(in.readLine());
			tokens = in.readLine().split(" ");
			List<Integer> list = new ArrayList<>();
			for (int j = 0; j < d[i]; ++j) {
				list.add(Integer.parseInt(tokens[j]));
			}
			A[i] = list;
		} int i = 0; int i = 0; i 0 i < K i K ++i ++i i {
			d[i] = Integer.parseInt(in.readLine());
			tokens = in.readLine().split(" ");
			List<Integer> list = new ArrayList<>();
			for (int j = 0; j < d[i]; ++j) {
				list.add(Integer.parseInt(tokens[j]));
			}
			A[i] = list;
		} {
			d[i] = Integer.parseInt(in.readLine());
			tokens = in.readLine().split(" ");
			List<Integer> list = new ArrayList<>();
			for (int j = 0; j < d[i]; ++j) {
				list.add(Integer.parseInt(tokens[j]));
			}
			A[i] = list;
		} d[i] = Integer.parseInt(in.readLine()) d[i] d i Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in tokens = in.readLine().split(" ") tokens in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " List<Integer> list = new ArrayList<>(); list new ArrayList<>() for (int j = 0; j < d[i]; ++j) {
				list.add(Integer.parseInt(tokens[j]));
			} int j = 0; int j = 0; j 0 j < d[i] j d[i] d i ++j ++j j {
				list.add(Integer.parseInt(tokens[j]));
			} {
				list.add(Integer.parseInt(tokens[j]));
			} list.add(Integer.parseInt(tokens[j])) list.add list Integer.parseInt(tokens[j]) Integer.parseInt Integer tokens[j] tokens j A[i] = list A[i] A i list Set<Integer> set = new HashSet<>(); set new HashSet<>() for (int i = 1; i <= N; ++i) {
			set.add(i);
		} int i = 1; int i = 1; i 1 i <= N i N ++i ++i i {
			set.add(i);
		} {
			set.add(i);
		} set.add(i) set.add set i for (List<Integer> list : A) {
			for (int j = 0; j < list.size(); ++j) {
				set.remove(list.get(j));
			}
		} List<Integer> list A {
			for (int j = 0; j < list.size(); ++j) {
				set.remove(list.get(j));
			}
		} {
			for (int j = 0; j < list.size(); ++j) {
				set.remove(list.get(j));
			}
		} for (int j = 0; j < list.size(); ++j) {
				set.remove(list.get(j));
			} int j = 0; int j = 0; j 0 j < list.size() j list.size() list.size list ++j ++j j {
				set.remove(list.get(j));
			} {
				set.remove(list.get(j));
			} set.remove(list.get(j)) set.remove set list.get(j) list.get list j System.out.println(set.size()) System.out.println System.out System System.out set.size() set.size set BufferedReader in in void calc() {
	} calc {
	} void showResult() {
	} showResult {
	} public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int K = Integer.parseInt(tokens[1]);

		int[] d = new int[K];
		List<Integer>[] A = new List[K];
		for (int i = 0; i < K; ++i) {
			d[i] = Integer.parseInt(in.readLine());
			tokens = in.readLine().split(" ");
			List<Integer> list = new ArrayList<>();
			for (int j = 0; j < d[i]; ++j) {
				list.add(Integer.parseInt(tokens[j]));
			}
			A[i] = list;
		}

		Set<Integer> set = new HashSet<>();
		for (int i = 1; i <= N; ++i) {
			set.add(i);
		}
		for (List<Integer> list : A) {
			for (int j = 0; j < list.size(); ++j) {
				set.remove(list.get(j));
			}
		}
		System.out.println(set.size());
	}

	void calc() {
	}

	void showResult() {
	}

} public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int K = Integer.parseInt(tokens[1]);

		int[] d = new int[K];
		List<Integer>[] A = new List[K];
		for (int i = 0; i < K; ++i) {
			d[i] = Integer.parseInt(in.readLine());
			tokens = in.readLine().split(" ");
			List<Integer> list = new ArrayList<>();
			for (int j = 0; j < d[i]; ++j) {
				list.add(Integer.parseInt(tokens[j]));
			}
			A[i] = list;
		}

		Set<Integer> set = new HashSet<>();
		for (int i = 1; i <= N; ++i) {
			set.add(i);
		}
		for (List<Integer> list : A) {
			for (int j = 0; j < list.size(); ++j) {
				set.remove(list.get(j));
			}
		}
		System.out.println(set.size());
	}

	void calc() {
	}

	void showResult() {
	}

} Main
import java.util.*;
import java.io.*;
import java.nio.charset.StandardCharsets;

public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	Main(BufferedReader in) throws IOException {
		String[] tokens = in.readLine().split(" ");
		int N = Integer.parseInt(tokens[0]);
		int K = Integer.parseInt(tokens[1]);

		int[] d = new int[K];
		List<Integer>[] A = new List[K];
		for (int i = 0; i < K; ++i) {
			d[i] = Integer.parseInt(in.readLine());
			tokens = in.readLine().split(" ");
			List<Integer> list = new ArrayList<>();
			for (int j = 0; j < d[i]; ++j) {
				list.add(Integer.parseInt(tokens[j]));
			}
			A[i] = list;
		}

		Set<Integer> set = new HashSet<>();
		for (int i = 1; i <= N; ++i) {
			set.add(i);
		}
		for (List<Integer> list : A) {
			for (int j = 0; j < list.size(); ++j) {
				set.remove(list.get(j));
			}
		}
		System.out.println(set.size());
	}

	void calc() {
	}

	void showResult() {
	}

}
