import java.util.Arrays;

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

			int n = scan.nextInt();
			int k = scan.nextInt();
			Integer[] a = new Integer [n];
			int iii = 0;
			int sum = 0;
			
			for (int i = 0 ; i < k ; i++) {
				int m = scan.nextInt();
				for(int ii = 0; ii < m ; ii++) {
					int b = scan.nextInt();
					if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					}
				}
			}
		for (int i = 1; i <= n ; i++ ) {
			for (int ii = 0 ; ii < iii; ii++) {
				if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				}
			}
		}
		
		
		System.out.println(sum);
		
		
		}
	 
	} import java.util.Arrays; Arrays java.util public class Main {
		 
		public static void main(String[] args) {
	 
			java.util.Scanner scan = new java.util.Scanner(System.in);
		

			int n = scan.nextInt();
			int k = scan.nextInt();
			Integer[] a = new Integer [n];
			int iii = 0;
			int sum = 0;
			
			for (int i = 0 ; i < k ; i++) {
				int m = scan.nextInt();
				for(int ii = 0; ii < m ; ii++) {
					int b = scan.nextInt();
					if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					}
				}
			}
		for (int i = 1; i <= n ; i++ ) {
			for (int ii = 0 ; ii < iii; ii++) {
				if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				}
			}
		}
		
		
		System.out.println(sum);
		
		
		}
	 
	} Main public static void main(String[] args) {
	 
			java.util.Scanner scan = new java.util.Scanner(System.in);
		

			int n = scan.nextInt();
			int k = scan.nextInt();
			Integer[] a = new Integer [n];
			int iii = 0;
			int sum = 0;
			
			for (int i = 0 ; i < k ; i++) {
				int m = scan.nextInt();
				for(int ii = 0; ii < m ; ii++) {
					int b = scan.nextInt();
					if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					}
				}
			}
		for (int i = 1; i <= n ; i++ ) {
			for (int ii = 0 ; ii < iii; ii++) {
				if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				}
			}
		}
		
		
		System.out.println(sum);
		
		
		} main {
	 
			java.util.Scanner scan = new java.util.Scanner(System.in);
		

			int n = scan.nextInt();
			int k = scan.nextInt();
			Integer[] a = new Integer [n];
			int iii = 0;
			int sum = 0;
			
			for (int i = 0 ; i < k ; i++) {
				int m = scan.nextInt();
				for(int ii = 0; ii < m ; ii++) {
					int b = scan.nextInt();
					if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					}
				}
			}
		for (int i = 1; i <= n ; i++ ) {
			for (int ii = 0 ; ii < iii; ii++) {
				if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				}
			}
		}
		
		
		System.out.println(sum);
		
		
		} java.util.Scanner scan = new java.util.Scanner(System.in); scan new java.util.Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int k = scan.nextInt(); k scan.nextInt() scan.nextInt scan Integer[] a = new Integer [n]; a new Integer [n] n int iii = 0; iii 0 int sum = 0; sum 0 for (int i = 0 ; i < k ; i++) {
				int m = scan.nextInt();
				for(int ii = 0; ii < m ; ii++) {
					int b = scan.nextInt();
					if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					}
				}
			} int i = 0 ; int i = 0 ; i 0 i < k i k i++ i++ i {
				int m = scan.nextInt();
				for(int ii = 0; ii < m ; ii++) {
					int b = scan.nextInt();
					if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					}
				}
			} {
				int m = scan.nextInt();
				for(int ii = 0; ii < m ; ii++) {
					int b = scan.nextInt();
					if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					}
				}
			} int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan for(int ii = 0; ii < m ; ii++) {
					int b = scan.nextInt();
					if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					}
				} int ii = 0; int ii = 0; ii 0 ii < m ii m ii++ ii++ ii {
					int b = scan.nextInt();
					if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					}
				} {
					int b = scan.nextInt();
					if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					}
				} int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					} Arrays.asList(a).contains(b) Arrays.asList(a).contains Arrays.asList(a) Arrays.asList Arrays a b {
						
					} {
						a[iii] = b;
						iii++;
					} a[iii] = b a[iii] a iii b iii++ iii for (int i = 1; i <= n ; i++ ) {
			for (int ii = 0 ; ii < iii; ii++) {
				if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				}
			}
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			for (int ii = 0 ; ii < iii; ii++) {
				if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				}
			}
		} {
			for (int ii = 0 ; ii < iii; ii++) {
				if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				}
			}
		} for (int ii = 0 ; ii < iii; ii++) {
				if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				}
			} int ii = 0 ; int ii = 0 ; ii 0 ii < iii ii iii ii++ ii++ ii {
				if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				}
			} {
				if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				}
			} if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				} a[ii] == i a[ii] a ii i {
					break;
				} break; if (ii == iii-1) {
					sum ++;
				} ii == iii-1 ii iii-1 iii 1 {
					sum ++;
				} sum ++ sum System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
		 
		public static void main(String[] args) {
	 
			java.util.Scanner scan = new java.util.Scanner(System.in);
		

			int n = scan.nextInt();
			int k = scan.nextInt();
			Integer[] a = new Integer [n];
			int iii = 0;
			int sum = 0;
			
			for (int i = 0 ; i < k ; i++) {
				int m = scan.nextInt();
				for(int ii = 0; ii < m ; ii++) {
					int b = scan.nextInt();
					if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					}
				}
			}
		for (int i = 1; i <= n ; i++ ) {
			for (int ii = 0 ; ii < iii; ii++) {
				if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				}
			}
		}
		
		
		System.out.println(sum);
		
		
		}
	 
	} public class Main {
		 
		public static void main(String[] args) {
	 
			java.util.Scanner scan = new java.util.Scanner(System.in);
		

			int n = scan.nextInt();
			int k = scan.nextInt();
			Integer[] a = new Integer [n];
			int iii = 0;
			int sum = 0;
			
			for (int i = 0 ; i < k ; i++) {
				int m = scan.nextInt();
				for(int ii = 0; ii < m ; ii++) {
					int b = scan.nextInt();
					if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					}
				}
			}
		for (int i = 1; i <= n ; i++ ) {
			for (int ii = 0 ; ii < iii; ii++) {
				if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				}
			}
		}
		
		
		System.out.println(sum);
		
		
		}
	 
	} Main
import java.util.Arrays;

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

			int n = scan.nextInt();
			int k = scan.nextInt();
			Integer[] a = new Integer [n];
			int iii = 0;
			int sum = 0;
			
			for (int i = 0 ; i < k ; i++) {
				int m = scan.nextInt();
				for(int ii = 0; ii < m ; ii++) {
					int b = scan.nextInt();
					if(Arrays.asList(a).contains(b)) {
						
					} else {
						a[iii] = b;
						iii++;
					}
				}
			}
		for (int i = 1; i <= n ; i++ ) {
			for (int ii = 0 ; ii < iii; ii++) {
				if(a[ii] == i) {
					break;
				} else if (ii == iii-1) {
					sum ++;
				}
			}
		}
		
		
		System.out.println(sum);
		
		
		}
	 
	}
