import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;

public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		long n = Long.parseLong(tmp[0]);
		long k = Long.parseLong(tmp[1]);
		Set<Integer> map = new HashSet<>();

		int num = 0;
		for(int i = 0; i < k; i++) {

			int now = Integer.parseInt(scanner.nextLine());
			String[] temp = scanner.nextLine().split(" ");
			for(int j = 0; j < now; j++) {

				num = Integer.parseInt(temp[j]);
				if(!map.contains(num)) map.add(num);


			}


		}

		System.out.println(n - map.size());


	}

} import java.util.HashSet; HashSet java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		long n = Long.parseLong(tmp[0]);
		long k = Long.parseLong(tmp[1]);
		Set<Integer> map = new HashSet<>();

		int num = 0;
		for(int i = 0; i < k; i++) {

			int now = Integer.parseInt(scanner.nextLine());
			String[] temp = scanner.nextLine().split(" ");
			for(int j = 0; j < now; j++) {

				num = Integer.parseInt(temp[j]);
				if(!map.contains(num)) map.add(num);


			}


		}

		System.out.println(n - map.size());


	}

} Main public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		long n = Long.parseLong(tmp[0]);
		long k = Long.parseLong(tmp[1]);
		Set<Integer> map = new HashSet<>();

		int num = 0;
		for(int i = 0; i < k; i++) {

			int now = Integer.parseInt(scanner.nextLine());
			String[] temp = scanner.nextLine().split(" ");
			for(int j = 0; j < now; j++) {

				num = Integer.parseInt(temp[j]);
				if(!map.contains(num)) map.add(num);


			}


		}

		System.out.println(n - map.size());


	} main {

		Scanner scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		long n = Long.parseLong(tmp[0]);
		long k = Long.parseLong(tmp[1]);
		Set<Integer> map = new HashSet<>();

		int num = 0;
		for(int i = 0; i < k; i++) {

			int now = Integer.parseInt(scanner.nextLine());
			String[] temp = scanner.nextLine().split(" ");
			for(int j = 0; j < now; j++) {

				num = Integer.parseInt(temp[j]);
				if(!map.contains(num)) map.add(num);


			}


		}

		System.out.println(n - map.size());


	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] tmp = scanner.nextLine().split(" "); tmp scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " long n = Long.parseLong(tmp[0]); n Long.parseLong(tmp[0]) Long.parseLong Long tmp[0] tmp 0 long k = Long.parseLong(tmp[1]); k Long.parseLong(tmp[1]) Long.parseLong Long tmp[1] tmp 1 Set<Integer> map = new HashSet<>(); map new HashSet<>() int num = 0; num 0 for(int i = 0; i < k; i++) {

			int now = Integer.parseInt(scanner.nextLine());
			String[] temp = scanner.nextLine().split(" ");
			for(int j = 0; j < now; j++) {

				num = Integer.parseInt(temp[j]);
				if(!map.contains(num)) map.add(num);


			}


		} int i = 0; int i = 0; i 0 i < k i k i++ i++ i {

			int now = Integer.parseInt(scanner.nextLine());
			String[] temp = scanner.nextLine().split(" ");
			for(int j = 0; j < now; j++) {

				num = Integer.parseInt(temp[j]);
				if(!map.contains(num)) map.add(num);


			}


		} {

			int now = Integer.parseInt(scanner.nextLine());
			String[] temp = scanner.nextLine().split(" ");
			for(int j = 0; j < now; j++) {

				num = Integer.parseInt(temp[j]);
				if(!map.contains(num)) map.add(num);


			}


		} int now = Integer.parseInt(scanner.nextLine()); now Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner String[] temp = scanner.nextLine().split(" "); temp scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " for(int j = 0; j < now; j++) {

				num = Integer.parseInt(temp[j]);
				if(!map.contains(num)) map.add(num);


			} int j = 0; int j = 0; j 0 j < now j now j++ j++ j {

				num = Integer.parseInt(temp[j]);
				if(!map.contains(num)) map.add(num);


			} {

				num = Integer.parseInt(temp[j]);
				if(!map.contains(num)) map.add(num);


			} num = Integer.parseInt(temp[j]) num Integer.parseInt(temp[j]) Integer.parseInt Integer temp[j] temp j if(!map.contains(num)) map.add(num); !map.contains(num) map.contains(num) map.contains map num map.add(num) map.add map num System.out.println(n - map.size()) System.out.println System.out System System.out n - map.size() n map.size() map.size map String[] args args public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		long n = Long.parseLong(tmp[0]);
		long k = Long.parseLong(tmp[1]);
		Set<Integer> map = new HashSet<>();

		int num = 0;
		for(int i = 0; i < k; i++) {

			int now = Integer.parseInt(scanner.nextLine());
			String[] temp = scanner.nextLine().split(" ");
			for(int j = 0; j < now; j++) {

				num = Integer.parseInt(temp[j]);
				if(!map.contains(num)) map.add(num);


			}


		}

		System.out.println(n - map.size());


	}

} public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		long n = Long.parseLong(tmp[0]);
		long k = Long.parseLong(tmp[1]);
		Set<Integer> map = new HashSet<>();

		int num = 0;
		for(int i = 0; i < k; i++) {

			int now = Integer.parseInt(scanner.nextLine());
			String[] temp = scanner.nextLine().split(" ");
			for(int j = 0; j < now; j++) {

				num = Integer.parseInt(temp[j]);
				if(!map.contains(num)) map.add(num);


			}


		}

		System.out.println(n - map.size());


	}

} Main
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;

public class Main{

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String[] tmp = scanner.nextLine().split(" ");
		long n = Long.parseLong(tmp[0]);
		long k = Long.parseLong(tmp[1]);
		Set<Integer> map = new HashSet<>();

		int num = 0;
		for(int i = 0; i < k; i++) {

			int now = Integer.parseInt(scanner.nextLine());
			String[] temp = scanner.nextLine().split(" ");
			for(int j = 0; j < now; j++) {

				num = Integer.parseInt(temp[j]);
				if(!map.contains(num)) map.add(num);


			}


		}

		System.out.println(n - map.size());


	}

}
