import java.util.ArrayList;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int K = s.nextInt();
		int[] d = new int[K];
		int[][] A;
		A = new int[K][];
		
		for(int i=0; i<K; i++) {
		    d[i] = s.nextInt();
		    A[i] = new int[d[i]];
			for(int k=0; k<d[i]; k++) {
				A[i][k] = s.nextInt();
			}
			
		}
		ArrayList<Integer> sunukes = new ArrayList<Integer>();
		for(int i=0; i<K; i++) {
			for(int k=0; k<d[i]; k++) {
				if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);}
			}
		}
		int ans = N - sunukes.size();
		System.out.println(ans);
	}

} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int K = s.nextInt();
		int[] d = new int[K];
		int[][] A;
		A = new int[K][];
		
		for(int i=0; i<K; i++) {
		    d[i] = s.nextInt();
		    A[i] = new int[d[i]];
			for(int k=0; k<d[i]; k++) {
				A[i][k] = s.nextInt();
			}
			
		}
		ArrayList<Integer> sunukes = new ArrayList<Integer>();
		for(int i=0; i<K; i++) {
			for(int k=0; k<d[i]; k++) {
				if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);}
			}
		}
		int ans = N - sunukes.size();
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int K = s.nextInt();
		int[] d = new int[K];
		int[][] A;
		A = new int[K][];
		
		for(int i=0; i<K; i++) {
		    d[i] = s.nextInt();
		    A[i] = new int[d[i]];
			for(int k=0; k<d[i]; k++) {
				A[i][k] = s.nextInt();
			}
			
		}
		ArrayList<Integer> sunukes = new ArrayList<Integer>();
		for(int i=0; i<K; i++) {
			for(int k=0; k<d[i]; k++) {
				if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);}
			}
		}
		int ans = N - sunukes.size();
		System.out.println(ans);
	} main {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int K = s.nextInt();
		int[] d = new int[K];
		int[][] A;
		A = new int[K][];
		
		for(int i=0; i<K; i++) {
		    d[i] = s.nextInt();
		    A[i] = new int[d[i]];
			for(int k=0; k<d[i]; k++) {
				A[i][k] = s.nextInt();
			}
			
		}
		ArrayList<Integer> sunukes = new ArrayList<Integer>();
		for(int i=0; i<K; i++) {
			for(int k=0; k<d[i]; k++) {
				if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);}
			}
		}
		int ans = N - sunukes.size();
		System.out.println(ans);
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int N = s.nextInt(); N s.nextInt() s.nextInt s int K = s.nextInt(); K s.nextInt() s.nextInt s int[] d = new int[K]; d new int[K] K int[][] A; A A = new int[K][] A new int[K][] K for(int i=0; i<K; i++) {
		    d[i] = s.nextInt();
		    A[i] = new int[d[i]];
			for(int k=0; k<d[i]; k++) {
				A[i][k] = s.nextInt();
			}
			
		} int i=0; int i=0; i 0 i<K i K i++ i++ i {
		    d[i] = s.nextInt();
		    A[i] = new int[d[i]];
			for(int k=0; k<d[i]; k++) {
				A[i][k] = s.nextInt();
			}
			
		} {
		    d[i] = s.nextInt();
		    A[i] = new int[d[i]];
			for(int k=0; k<d[i]; k++) {
				A[i][k] = s.nextInt();
			}
			
		} d[i] = s.nextInt() d[i] d i s.nextInt() s.nextInt s A[i] = new int[d[i]] A[i] A i new int[d[i]] d[i] d i for(int k=0; k<d[i]; k++) {
				A[i][k] = s.nextInt();
			} int k=0; int k=0; k 0 k<d[i] k d[i] d i k++ k++ k {
				A[i][k] = s.nextInt();
			} {
				A[i][k] = s.nextInt();
			} A[i][k] = s.nextInt() A[i][k] A[i] A i k s.nextInt() s.nextInt s ArrayList<Integer> sunukes = new ArrayList<Integer>(); sunukes new ArrayList<Integer>() for(int i=0; i<K; i++) {
			for(int k=0; k<d[i]; k++) {
				if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);}
			}
		} int i=0; int i=0; i 0 i<K i K i++ i++ i {
			for(int k=0; k<d[i]; k++) {
				if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);}
			}
		} {
			for(int k=0; k<d[i]; k++) {
				if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);}
			}
		} for(int k=0; k<d[i]; k++) {
				if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);}
			} int k=0; int k=0; k 0 k<d[i] k d[i] d i k++ k++ k {
				if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);}
			} {
				if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);}
			} if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);} sunukes.contains(A[i][k]) sunukes.contains sunukes A[i][k] A[i] A i k {} {sunukes.add(A[i][k]);} sunukes.add(A[i][k]) sunukes.add sunukes A[i][k] A[i] A i k int ans = N - sunukes.size(); ans N - sunukes.size() N sunukes.size() sunukes.size sunukes System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int K = s.nextInt();
		int[] d = new int[K];
		int[][] A;
		A = new int[K][];
		
		for(int i=0; i<K; i++) {
		    d[i] = s.nextInt();
		    A[i] = new int[d[i]];
			for(int k=0; k<d[i]; k++) {
				A[i][k] = s.nextInt();
			}
			
		}
		ArrayList<Integer> sunukes = new ArrayList<Integer>();
		for(int i=0; i<K; i++) {
			for(int k=0; k<d[i]; k++) {
				if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);}
			}
		}
		int ans = N - sunukes.size();
		System.out.println(ans);
	}

} public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int K = s.nextInt();
		int[] d = new int[K];
		int[][] A;
		A = new int[K][];
		
		for(int i=0; i<K; i++) {
		    d[i] = s.nextInt();
		    A[i] = new int[d[i]];
			for(int k=0; k<d[i]; k++) {
				A[i][k] = s.nextInt();
			}
			
		}
		ArrayList<Integer> sunukes = new ArrayList<Integer>();
		for(int i=0; i<K; i++) {
			for(int k=0; k<d[i]; k++) {
				if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);}
			}
		}
		int ans = N - sunukes.size();
		System.out.println(ans);
	}

} Main
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int K = s.nextInt();
		int[] d = new int[K];
		int[][] A;
		A = new int[K][];
		
		for(int i=0; i<K; i++) {
		    d[i] = s.nextInt();
		    A[i] = new int[d[i]];
			for(int k=0; k<d[i]; k++) {
				A[i][k] = s.nextInt();
			}
			
		}
		ArrayList<Integer> sunukes = new ArrayList<Integer>();
		for(int i=0; i<K; i++) {
			for(int k=0; k<d[i]; k++) {
				if(sunukes.contains(A[i][k])) {}
				else {sunukes.add(A[i][k]);}
			}
		}
		int ans = N - sunukes.size();
		System.out.println(ans);
	}

}
