import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	
	public static void main(String [] args) {
		Scanner scanner = new Scanner(System.in);
		int k = scanner.nextInt();
		int n = scanner.nextInt();
		int[] d = new int[n];
		List<Integer> a[] = new ArrayList[k];
		for (int i = 0 ; i < n ; i ++) {
			int di = scanner.nextInt();
			d[i] = di;
			for (int j = 0 ; j < di ; j ++) {
				int aj = scanner.nextInt();
				List<Integer> ajtemp = a[aj - 1];
				if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				}
				ajtemp.add(ajtemp.size() + 1);
				a[aj - 1] = ajtemp;
			}
		}
		int ans = 0;
		for (List<Integer> temp : a) {
			if (temp == null || temp.size() == 0) {
				ans ++;
			}
		}
		System.out.println(ans);
		scanner.close();
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String [] args) {
		Scanner scanner = new Scanner(System.in);
		int k = scanner.nextInt();
		int n = scanner.nextInt();
		int[] d = new int[n];
		List<Integer> a[] = new ArrayList[k];
		for (int i = 0 ; i < n ; i ++) {
			int di = scanner.nextInt();
			d[i] = di;
			for (int j = 0 ; j < di ; j ++) {
				int aj = scanner.nextInt();
				List<Integer> ajtemp = a[aj - 1];
				if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				}
				ajtemp.add(ajtemp.size() + 1);
				a[aj - 1] = ajtemp;
			}
		}
		int ans = 0;
		for (List<Integer> temp : a) {
			if (temp == null || temp.size() == 0) {
				ans ++;
			}
		}
		System.out.println(ans);
		scanner.close();
	}
} Main public static void main(String [] args) {
		Scanner scanner = new Scanner(System.in);
		int k = scanner.nextInt();
		int n = scanner.nextInt();
		int[] d = new int[n];
		List<Integer> a[] = new ArrayList[k];
		for (int i = 0 ; i < n ; i ++) {
			int di = scanner.nextInt();
			d[i] = di;
			for (int j = 0 ; j < di ; j ++) {
				int aj = scanner.nextInt();
				List<Integer> ajtemp = a[aj - 1];
				if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				}
				ajtemp.add(ajtemp.size() + 1);
				a[aj - 1] = ajtemp;
			}
		}
		int ans = 0;
		for (List<Integer> temp : a) {
			if (temp == null || temp.size() == 0) {
				ans ++;
			}
		}
		System.out.println(ans);
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		int k = scanner.nextInt();
		int n = scanner.nextInt();
		int[] d = new int[n];
		List<Integer> a[] = new ArrayList[k];
		for (int i = 0 ; i < n ; i ++) {
			int di = scanner.nextInt();
			d[i] = di;
			for (int j = 0 ; j < di ; j ++) {
				int aj = scanner.nextInt();
				List<Integer> ajtemp = a[aj - 1];
				if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				}
				ajtemp.add(ajtemp.size() + 1);
				a[aj - 1] = ajtemp;
			}
		}
		int ans = 0;
		for (List<Integer> temp : a) {
			if (temp == null || temp.size() == 0) {
				ans ++;
			}
		}
		System.out.println(ans);
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int k = scanner.nextInt(); k scanner.nextInt() scanner.nextInt scanner int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int[] d = new int[n]; d new int[n] n List<Integer> a[] = new ArrayList[k]; a new ArrayList[k] k for (int i = 0 ; i < n ; i ++) {
			int di = scanner.nextInt();
			d[i] = di;
			for (int j = 0 ; j < di ; j ++) {
				int aj = scanner.nextInt();
				List<Integer> ajtemp = a[aj - 1];
				if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				}
				ajtemp.add(ajtemp.size() + 1);
				a[aj - 1] = ajtemp;
			}
		} int i = 0 ; int i = 0 ; i 0 i < n i n i ++ i ++ i {
			int di = scanner.nextInt();
			d[i] = di;
			for (int j = 0 ; j < di ; j ++) {
				int aj = scanner.nextInt();
				List<Integer> ajtemp = a[aj - 1];
				if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				}
				ajtemp.add(ajtemp.size() + 1);
				a[aj - 1] = ajtemp;
			}
		} {
			int di = scanner.nextInt();
			d[i] = di;
			for (int j = 0 ; j < di ; j ++) {
				int aj = scanner.nextInt();
				List<Integer> ajtemp = a[aj - 1];
				if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				}
				ajtemp.add(ajtemp.size() + 1);
				a[aj - 1] = ajtemp;
			}
		} int di = scanner.nextInt(); di scanner.nextInt() scanner.nextInt scanner d[i] = di d[i] d i di for (int j = 0 ; j < di ; j ++) {
				int aj = scanner.nextInt();
				List<Integer> ajtemp = a[aj - 1];
				if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				}
				ajtemp.add(ajtemp.size() + 1);
				a[aj - 1] = ajtemp;
			} int j = 0 ; int j = 0 ; j 0 j < di j di j ++ j ++ j {
				int aj = scanner.nextInt();
				List<Integer> ajtemp = a[aj - 1];
				if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				}
				ajtemp.add(ajtemp.size() + 1);
				a[aj - 1] = ajtemp;
			} {
				int aj = scanner.nextInt();
				List<Integer> ajtemp = a[aj - 1];
				if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				}
				ajtemp.add(ajtemp.size() + 1);
				a[aj - 1] = ajtemp;
			} int aj = scanner.nextInt(); aj scanner.nextInt() scanner.nextInt scanner List<Integer> ajtemp = a[aj - 1]; ajtemp a[aj - 1] a aj - 1 aj 1 if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				} ajtemp == null ajtemp null {
					ajtemp = new ArrayList<>();
				} ajtemp = new ArrayList<>() ajtemp new ArrayList<>() ajtemp.add(ajtemp.size() + 1) ajtemp.add ajtemp ajtemp.size() + 1 ajtemp.size() ajtemp.size ajtemp 1 a[aj - 1] = ajtemp a[aj - 1] a aj - 1 aj 1 ajtemp int ans = 0; ans 0 for (List<Integer> temp : a) {
			if (temp == null || temp.size() == 0) {
				ans ++;
			}
		} List<Integer> temp a {
			if (temp == null || temp.size() == 0) {
				ans ++;
			}
		} {
			if (temp == null || temp.size() == 0) {
				ans ++;
			}
		} if (temp == null || temp.size() == 0) {
				ans ++;
			} temp == null || temp.size() == 0 temp == null temp null temp.size() == 0 temp.size() temp.size temp 0 {
				ans ++;
			} ans ++ ans System.out.println(ans) System.out.println System.out System System.out ans scanner.close() scanner.close scanner String [] args args public class Main {
	
	public static void main(String [] args) {
		Scanner scanner = new Scanner(System.in);
		int k = scanner.nextInt();
		int n = scanner.nextInt();
		int[] d = new int[n];
		List<Integer> a[] = new ArrayList[k];
		for (int i = 0 ; i < n ; i ++) {
			int di = scanner.nextInt();
			d[i] = di;
			for (int j = 0 ; j < di ; j ++) {
				int aj = scanner.nextInt();
				List<Integer> ajtemp = a[aj - 1];
				if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				}
				ajtemp.add(ajtemp.size() + 1);
				a[aj - 1] = ajtemp;
			}
		}
		int ans = 0;
		for (List<Integer> temp : a) {
			if (temp == null || temp.size() == 0) {
				ans ++;
			}
		}
		System.out.println(ans);
		scanner.close();
	}
} public class Main {
	
	public static void main(String [] args) {
		Scanner scanner = new Scanner(System.in);
		int k = scanner.nextInt();
		int n = scanner.nextInt();
		int[] d = new int[n];
		List<Integer> a[] = new ArrayList[k];
		for (int i = 0 ; i < n ; i ++) {
			int di = scanner.nextInt();
			d[i] = di;
			for (int j = 0 ; j < di ; j ++) {
				int aj = scanner.nextInt();
				List<Integer> ajtemp = a[aj - 1];
				if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				}
				ajtemp.add(ajtemp.size() + 1);
				a[aj - 1] = ajtemp;
			}
		}
		int ans = 0;
		for (List<Integer> temp : a) {
			if (temp == null || temp.size() == 0) {
				ans ++;
			}
		}
		System.out.println(ans);
		scanner.close();
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	
	public static void main(String [] args) {
		Scanner scanner = new Scanner(System.in);
		int k = scanner.nextInt();
		int n = scanner.nextInt();
		int[] d = new int[n];
		List<Integer> a[] = new ArrayList[k];
		for (int i = 0 ; i < n ; i ++) {
			int di = scanner.nextInt();
			d[i] = di;
			for (int j = 0 ; j < di ; j ++) {
				int aj = scanner.nextInt();
				List<Integer> ajtemp = a[aj - 1];
				if (ajtemp == null ) {
					ajtemp = new ArrayList<>();
				}
				ajtemp.add(ajtemp.size() + 1);
				a[aj - 1] = ajtemp;
			}
		}
		int ans = 0;
		for (List<Integer> temp : a) {
			if (temp == null || temp.size() == 0) {
				ans ++;
			}
		}
		System.out.println(ans);
		scanner.close();
	}
}