import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner scn = new Scanner(System.in)) {
			int N = scn.nextInt();
			int K = scn.nextInt();

			int[] A = new int[N];
			int[][] ak = new int[K][N+1];

			for(int i = 0; i < K; i++) {
				ak[i][0] = scn.nextInt();
				for(int j = 1; j <= ak[i][0]; j++) {
					ak[i][j] = scn.nextInt();
				}
			}

			for(int i = 0; i < K; i++) {
				for(int j = 1; j <= ak[i][0]; j++) {
					A[ak[i][j]-1] = 1;
				}
			}


			int cnt = 0;
			for(int i = 0; i < N; i++) {
				if(A[i] == 0) cnt++;
			}

			System.out.println(cnt);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		try (Scanner scn = new Scanner(System.in)) {
			int N = scn.nextInt();
			int K = scn.nextInt();

			int[] A = new int[N];
			int[][] ak = new int[K][N+1];

			for(int i = 0; i < K; i++) {
				ak[i][0] = scn.nextInt();
				for(int j = 1; j <= ak[i][0]; j++) {
					ak[i][j] = scn.nextInt();
				}
			}

			for(int i = 0; i < K; i++) {
				for(int j = 1; j <= ak[i][0]; j++) {
					A[ak[i][j]-1] = 1;
				}
			}


			int cnt = 0;
			for(int i = 0; i < N; i++) {
				if(A[i] == 0) cnt++;
			}

			System.out.println(cnt);
		}
	}
} Main public static void main(String[] args) {
		try (Scanner scn = new Scanner(System.in)) {
			int N = scn.nextInt();
			int K = scn.nextInt();

			int[] A = new int[N];
			int[][] ak = new int[K][N+1];

			for(int i = 0; i < K; i++) {
				ak[i][0] = scn.nextInt();
				for(int j = 1; j <= ak[i][0]; j++) {
					ak[i][j] = scn.nextInt();
				}
			}

			for(int i = 0; i < K; i++) {
				for(int j = 1; j <= ak[i][0]; j++) {
					A[ak[i][j]-1] = 1;
				}
			}


			int cnt = 0;
			for(int i = 0; i < N; i++) {
				if(A[i] == 0) cnt++;
			}

			System.out.println(cnt);
		}
	} main {
		try (Scanner scn = new Scanner(System.in)) {
			int N = scn.nextInt();
			int K = scn.nextInt();

			int[] A = new int[N];
			int[][] ak = new int[K][N+1];

			for(int i = 0; i < K; i++) {
				ak[i][0] = scn.nextInt();
				for(int j = 1; j <= ak[i][0]; j++) {
					ak[i][j] = scn.nextInt();
				}
			}

			for(int i = 0; i < K; i++) {
				for(int j = 1; j <= ak[i][0]; j++) {
					A[ak[i][j]-1] = 1;
				}
			}


			int cnt = 0;
			for(int i = 0; i < N; i++) {
				if(A[i] == 0) cnt++;
			}

			System.out.println(cnt);
		}
	} try (Scanner scn = new Scanner(System.in)) {
			int N = scn.nextInt();
			int K = scn.nextInt();

			int[] A = new int[N];
			int[][] ak = new int[K][N+1];

			for(int i = 0; i < K; i++) {
				ak[i][0] = scn.nextInt();
				for(int j = 1; j <= ak[i][0]; j++) {
					ak[i][j] = scn.nextInt();
				}
			}

			for(int i = 0; i < K; i++) {
				for(int j = 1; j <= ak[i][0]; j++) {
					A[ak[i][j]-1] = 1;
				}
			}


			int cnt = 0;
			for(int i = 0; i < N; i++) {
				if(A[i] == 0) cnt++;
			}

			System.out.println(cnt);
		} {
			int N = scn.nextInt();
			int K = scn.nextInt();

			int[] A = new int[N];
			int[][] ak = new int[K][N+1];

			for(int i = 0; i < K; i++) {
				ak[i][0] = scn.nextInt();
				for(int j = 1; j <= ak[i][0]; j++) {
					ak[i][j] = scn.nextInt();
				}
			}

			for(int i = 0; i < K; i++) {
				for(int j = 1; j <= ak[i][0]; j++) {
					A[ak[i][j]-1] = 1;
				}
			}


			int cnt = 0;
			for(int i = 0; i < N; i++) {
				if(A[i] == 0) cnt++;
			}

			System.out.println(cnt);
		} Scanner scn = new Scanner(System.in) Scanner scn = new Scanner(System.in) new Scanner(System.in) int N = scn.nextInt(); N scn.nextInt() scn.nextInt scn int K = scn.nextInt(); K scn.nextInt() scn.nextInt scn int[] A = new int[N]; A new int[N] N int[][] ak = new int[K][N+1]; ak new int[K][N+1] K N+1 N 1 for(int i = 0; i < K; i++) {
				ak[i][0] = scn.nextInt();
				for(int j = 1; j <= ak[i][0]; j++) {
					ak[i][j] = scn.nextInt();
				}
			} int i = 0; int i = 0; i 0 i < K i K i++ i++ i {
				ak[i][0] = scn.nextInt();
				for(int j = 1; j <= ak[i][0]; j++) {
					ak[i][j] = scn.nextInt();
				}
			} {
				ak[i][0] = scn.nextInt();
				for(int j = 1; j <= ak[i][0]; j++) {
					ak[i][j] = scn.nextInt();
				}
			} ak[i][0] = scn.nextInt() ak[i][0] ak[i] ak i 0 scn.nextInt() scn.nextInt scn for(int j = 1; j <= ak[i][0]; j++) {
					ak[i][j] = scn.nextInt();
				} int j = 1; int j = 1; j 1 j <= ak[i][0] j ak[i][0] ak[i] ak i 0 j++ j++ j {
					ak[i][j] = scn.nextInt();
				} {
					ak[i][j] = scn.nextInt();
				} ak[i][j] = scn.nextInt() ak[i][j] ak[i] ak i j scn.nextInt() scn.nextInt scn for(int i = 0; i < K; i++) {
				for(int j = 1; j <= ak[i][0]; j++) {
					A[ak[i][j]-1] = 1;
				}
			} int i = 0; int i = 0; i 0 i < K i K i++ i++ i {
				for(int j = 1; j <= ak[i][0]; j++) {
					A[ak[i][j]-1] = 1;
				}
			} {
				for(int j = 1; j <= ak[i][0]; j++) {
					A[ak[i][j]-1] = 1;
				}
			} for(int j = 1; j <= ak[i][0]; j++) {
					A[ak[i][j]-1] = 1;
				} int j = 1; int j = 1; j 1 j <= ak[i][0] j ak[i][0] ak[i] ak i 0 j++ j++ j {
					A[ak[i][j]-1] = 1;
				} {
					A[ak[i][j]-1] = 1;
				} A[ak[i][j]-1] = 1 A[ak[i][j]-1] A ak[i][j]-1 ak[i][j] ak[i] ak i j 1 1 int cnt = 0; cnt 0 for(int i = 0; i < N; i++) {
				if(A[i] == 0) cnt++;
			} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
				if(A[i] == 0) cnt++;
			} {
				if(A[i] == 0) cnt++;
			} if(A[i] == 0) cnt++; A[i] == 0 A[i] A i 0 cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
	public static void main(String[] args) {
		try (Scanner scn = new Scanner(System.in)) {
			int N = scn.nextInt();
			int K = scn.nextInt();

			int[] A = new int[N];
			int[][] ak = new int[K][N+1];

			for(int i = 0; i < K; i++) {
				ak[i][0] = scn.nextInt();
				for(int j = 1; j <= ak[i][0]; j++) {
					ak[i][j] = scn.nextInt();
				}
			}

			for(int i = 0; i < K; i++) {
				for(int j = 1; j <= ak[i][0]; j++) {
					A[ak[i][j]-1] = 1;
				}
			}


			int cnt = 0;
			for(int i = 0; i < N; i++) {
				if(A[i] == 0) cnt++;
			}

			System.out.println(cnt);
		}
	}
} public class Main {
	public static void main(String[] args) {
		try (Scanner scn = new Scanner(System.in)) {
			int N = scn.nextInt();
			int K = scn.nextInt();

			int[] A = new int[N];
			int[][] ak = new int[K][N+1];

			for(int i = 0; i < K; i++) {
				ak[i][0] = scn.nextInt();
				for(int j = 1; j <= ak[i][0]; j++) {
					ak[i][j] = scn.nextInt();
				}
			}

			for(int i = 0; i < K; i++) {
				for(int j = 1; j <= ak[i][0]; j++) {
					A[ak[i][j]-1] = 1;
				}
			}


			int cnt = 0;
			for(int i = 0; i < N; i++) {
				if(A[i] == 0) cnt++;
			}

			System.out.println(cnt);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner scn = new Scanner(System.in)) {
			int N = scn.nextInt();
			int K = scn.nextInt();

			int[] A = new int[N];
			int[][] ak = new int[K][N+1];

			for(int i = 0; i < K; i++) {
				ak[i][0] = scn.nextInt();
				for(int j = 1; j <= ak[i][0]; j++) {
					ak[i][j] = scn.nextInt();
				}
			}

			for(int i = 0; i < K; i++) {
				for(int j = 1; j <= ak[i][0]; j++) {
					A[ak[i][j]-1] = 1;
				}
			}


			int cnt = 0;
			for(int i = 0; i < N; i++) {
				if(A[i] == 0) cnt++;
			}

			System.out.println(cnt);
		}
	}
}