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

// https://atcoder.jp/contests/abc166/tasks/abc166_b
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();


		String[] array = new String[n];
		for(int i=0;i<n;i++){
			array[i]="hoge";
		}

		for(int i=0;i<k;i++) {
			int d = sc.nextInt();
			for(int j=0;j<d;j++) {
				int flag = sc.nextInt();
				array[flag-1] = "aa";
			}
		}
		sc.close();

		List<String> list = new ArrayList<>(Arrays.asList(array));
		List<String> set = new ArrayList<>();
        Collections.addAll(set, "hoge");
		list.removeAll(set);
		list.size();
		System.out.println(n-list.size());




	}
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections 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) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();


		String[] array = new String[n];
		for(int i=0;i<n;i++){
			array[i]="hoge";
		}

		for(int i=0;i<k;i++) {
			int d = sc.nextInt();
			for(int j=0;j<d;j++) {
				int flag = sc.nextInt();
				array[flag-1] = "aa";
			}
		}
		sc.close();

		List<String> list = new ArrayList<>(Arrays.asList(array));
		List<String> set = new ArrayList<>();
        Collections.addAll(set, "hoge");
		list.removeAll(set);
		list.size();
		System.out.println(n-list.size());




	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();


		String[] array = new String[n];
		for(int i=0;i<n;i++){
			array[i]="hoge";
		}

		for(int i=0;i<k;i++) {
			int d = sc.nextInt();
			for(int j=0;j<d;j++) {
				int flag = sc.nextInt();
				array[flag-1] = "aa";
			}
		}
		sc.close();

		List<String> list = new ArrayList<>(Arrays.asList(array));
		List<String> set = new ArrayList<>();
        Collections.addAll(set, "hoge");
		list.removeAll(set);
		list.size();
		System.out.println(n-list.size());




	} main {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();


		String[] array = new String[n];
		for(int i=0;i<n;i++){
			array[i]="hoge";
		}

		for(int i=0;i<k;i++) {
			int d = sc.nextInt();
			for(int j=0;j<d;j++) {
				int flag = sc.nextInt();
				array[flag-1] = "aa";
			}
		}
		sc.close();

		List<String> list = new ArrayList<>(Arrays.asList(array));
		List<String> set = new ArrayList<>();
        Collections.addAll(set, "hoge");
		list.removeAll(set);
		list.size();
		System.out.println(n-list.size());




	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc String[] array = new String[n]; array new String[n] n for(int i=0;i<n;i++){
			array[i]="hoge";
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			array[i]="hoge";
		} {
			array[i]="hoge";
		} array[i]="hoge" array[i] array i "hoge" for(int i=0;i<k;i++) {
			int d = sc.nextInt();
			for(int j=0;j<d;j++) {
				int flag = sc.nextInt();
				array[flag-1] = "aa";
			}
		} int i=0; int i=0; i 0 i<k i k i++ i++ i {
			int d = sc.nextInt();
			for(int j=0;j<d;j++) {
				int flag = sc.nextInt();
				array[flag-1] = "aa";
			}
		} {
			int d = sc.nextInt();
			for(int j=0;j<d;j++) {
				int flag = sc.nextInt();
				array[flag-1] = "aa";
			}
		} int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc for(int j=0;j<d;j++) {
				int flag = sc.nextInt();
				array[flag-1] = "aa";
			} int j=0; int j=0; j 0 j<d j d j++ j++ j {
				int flag = sc.nextInt();
				array[flag-1] = "aa";
			} {
				int flag = sc.nextInt();
				array[flag-1] = "aa";
			} int flag = sc.nextInt(); flag sc.nextInt() sc.nextInt sc array[flag-1] = "aa" array[flag-1] array flag-1 flag 1 "aa" sc.close() sc.close sc List<String> list = new ArrayList<>(Arrays.asList(array)); list new ArrayList<>(Arrays.asList(array)) List<String> set = new ArrayList<>(); set new ArrayList<>() Collections.addAll(set, "hoge") Collections.addAll Collections set "hoge" list.removeAll(set) list.removeAll list set list.size() list.size list System.out.println(n-list.size()) System.out.println System.out System System.out n-list.size() n list.size() list.size list String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();


		String[] array = new String[n];
		for(int i=0;i<n;i++){
			array[i]="hoge";
		}

		for(int i=0;i<k;i++) {
			int d = sc.nextInt();
			for(int j=0;j<d;j++) {
				int flag = sc.nextInt();
				array[flag-1] = "aa";
			}
		}
		sc.close();

		List<String> list = new ArrayList<>(Arrays.asList(array));
		List<String> set = new ArrayList<>();
        Collections.addAll(set, "hoge");
		list.removeAll(set);
		list.size();
		System.out.println(n-list.size());




	}
} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();


		String[] array = new String[n];
		for(int i=0;i<n;i++){
			array[i]="hoge";
		}

		for(int i=0;i<k;i++) {
			int d = sc.nextInt();
			for(int j=0;j<d;j++) {
				int flag = sc.nextInt();
				array[flag-1] = "aa";
			}
		}
		sc.close();

		List<String> list = new ArrayList<>(Arrays.asList(array));
		List<String> set = new ArrayList<>();
        Collections.addAll(set, "hoge");
		list.removeAll(set);
		list.size();
		System.out.println(n-list.size());




	}
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

// https://atcoder.jp/contests/abc166/tasks/abc166_b
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();


		String[] array = new String[n];
		for(int i=0;i<n;i++){
			array[i]="hoge";
		}

		for(int i=0;i<k;i++) {
			int d = sc.nextInt();
			for(int j=0;j<d;j++) {
				int flag = sc.nextInt();
				array[flag-1] = "aa";
			}
		}
		sc.close();

		List<String> list = new ArrayList<>(Arrays.asList(array));
		List<String> set = new ArrayList<>();
        Collections.addAll(set, "hoge");
		list.removeAll(set);
		list.size();
		System.out.println(n-list.size());




	}
}
