import java.util.*;

public class Main{
	public static void main(String[] args) {
		Scanner a = new Scanner(System.in);
		String b = a.nextLine();
		String[] vals = b.split(" ");
		int comp = Integer.parseInt(vals[0]);
		int c = Integer.parseInt(vals[1]);
		ArrayList<Integer> list= new ArrayList<Integer>();
		for (int i = 0;i<c;i++) {
			String wfeihu = a.nextLine();
			String nums = a.nextLine();
			String[] d = nums.split(" ");
			for (int j=0;j<d.length;j++) {
				int p = Integer.parseInt(d[j]);
				if (!list.contains(p)) {
					list.add(p);
				}
			}
		}
		System.out.println(comp-list.size());
	}
		
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) {
		Scanner a = new Scanner(System.in);
		String b = a.nextLine();
		String[] vals = b.split(" ");
		int comp = Integer.parseInt(vals[0]);
		int c = Integer.parseInt(vals[1]);
		ArrayList<Integer> list= new ArrayList<Integer>();
		for (int i = 0;i<c;i++) {
			String wfeihu = a.nextLine();
			String nums = a.nextLine();
			String[] d = nums.split(" ");
			for (int j=0;j<d.length;j++) {
				int p = Integer.parseInt(d[j]);
				if (!list.contains(p)) {
					list.add(p);
				}
			}
		}
		System.out.println(comp-list.size());
	}
		
} Main public static void main(String[] args) {
		Scanner a = new Scanner(System.in);
		String b = a.nextLine();
		String[] vals = b.split(" ");
		int comp = Integer.parseInt(vals[0]);
		int c = Integer.parseInt(vals[1]);
		ArrayList<Integer> list= new ArrayList<Integer>();
		for (int i = 0;i<c;i++) {
			String wfeihu = a.nextLine();
			String nums = a.nextLine();
			String[] d = nums.split(" ");
			for (int j=0;j<d.length;j++) {
				int p = Integer.parseInt(d[j]);
				if (!list.contains(p)) {
					list.add(p);
				}
			}
		}
		System.out.println(comp-list.size());
	} main {
		Scanner a = new Scanner(System.in);
		String b = a.nextLine();
		String[] vals = b.split(" ");
		int comp = Integer.parseInt(vals[0]);
		int c = Integer.parseInt(vals[1]);
		ArrayList<Integer> list= new ArrayList<Integer>();
		for (int i = 0;i<c;i++) {
			String wfeihu = a.nextLine();
			String nums = a.nextLine();
			String[] d = nums.split(" ");
			for (int j=0;j<d.length;j++) {
				int p = Integer.parseInt(d[j]);
				if (!list.contains(p)) {
					list.add(p);
				}
			}
		}
		System.out.println(comp-list.size());
	} Scanner a = new Scanner(System.in); a new Scanner(System.in) String b = a.nextLine(); b a.nextLine() a.nextLine a String[] vals = b.split(" "); vals b.split(" ") b.split b " " int comp = Integer.parseInt(vals[0]); comp Integer.parseInt(vals[0]) Integer.parseInt Integer vals[0] vals 0 int c = Integer.parseInt(vals[1]); c Integer.parseInt(vals[1]) Integer.parseInt Integer vals[1] vals 1 ArrayList<Integer> list= new ArrayList<Integer>(); list new ArrayList<Integer>() for (int i = 0;i<c;i++) {
			String wfeihu = a.nextLine();
			String nums = a.nextLine();
			String[] d = nums.split(" ");
			for (int j=0;j<d.length;j++) {
				int p = Integer.parseInt(d[j]);
				if (!list.contains(p)) {
					list.add(p);
				}
			}
		} int i = 0; int i = 0; i 0 i<c i c i++ i++ i {
			String wfeihu = a.nextLine();
			String nums = a.nextLine();
			String[] d = nums.split(" ");
			for (int j=0;j<d.length;j++) {
				int p = Integer.parseInt(d[j]);
				if (!list.contains(p)) {
					list.add(p);
				}
			}
		} {
			String wfeihu = a.nextLine();
			String nums = a.nextLine();
			String[] d = nums.split(" ");
			for (int j=0;j<d.length;j++) {
				int p = Integer.parseInt(d[j]);
				if (!list.contains(p)) {
					list.add(p);
				}
			}
		} String wfeihu = a.nextLine(); wfeihu a.nextLine() a.nextLine a String nums = a.nextLine(); nums a.nextLine() a.nextLine a String[] d = nums.split(" "); d nums.split(" ") nums.split nums " " for (int j=0;j<d.length;j++) {
				int p = Integer.parseInt(d[j]);
				if (!list.contains(p)) {
					list.add(p);
				}
			} int j=0; int j=0; j 0 j<d.length j d.length d d.length j++ j++ j {
				int p = Integer.parseInt(d[j]);
				if (!list.contains(p)) {
					list.add(p);
				}
			} {
				int p = Integer.parseInt(d[j]);
				if (!list.contains(p)) {
					list.add(p);
				}
			} int p = Integer.parseInt(d[j]); p Integer.parseInt(d[j]) Integer.parseInt Integer d[j] d j if (!list.contains(p)) {
					list.add(p);
				} !list.contains(p) list.contains(p) list.contains list p {
					list.add(p);
				} list.add(p) list.add list p System.out.println(comp-list.size()) System.out.println System.out System System.out comp-list.size() comp list.size() list.size list String[] args args public class Main{
	public static void main(String[] args) {
		Scanner a = new Scanner(System.in);
		String b = a.nextLine();
		String[] vals = b.split(" ");
		int comp = Integer.parseInt(vals[0]);
		int c = Integer.parseInt(vals[1]);
		ArrayList<Integer> list= new ArrayList<Integer>();
		for (int i = 0;i<c;i++) {
			String wfeihu = a.nextLine();
			String nums = a.nextLine();
			String[] d = nums.split(" ");
			for (int j=0;j<d.length;j++) {
				int p = Integer.parseInt(d[j]);
				if (!list.contains(p)) {
					list.add(p);
				}
			}
		}
		System.out.println(comp-list.size());
	}
		
} public class Main{
	public static void main(String[] args) {
		Scanner a = new Scanner(System.in);
		String b = a.nextLine();
		String[] vals = b.split(" ");
		int comp = Integer.parseInt(vals[0]);
		int c = Integer.parseInt(vals[1]);
		ArrayList<Integer> list= new ArrayList<Integer>();
		for (int i = 0;i<c;i++) {
			String wfeihu = a.nextLine();
			String nums = a.nextLine();
			String[] d = nums.split(" ");
			for (int j=0;j<d.length;j++) {
				int p = Integer.parseInt(d[j]);
				if (!list.contains(p)) {
					list.add(p);
				}
			}
		}
		System.out.println(comp-list.size());
	}
		
} Main
import java.util.*;

public class Main{
	public static void main(String[] args) {
		Scanner a = new Scanner(System.in);
		String b = a.nextLine();
		String[] vals = b.split(" ");
		int comp = Integer.parseInt(vals[0]);
		int c = Integer.parseInt(vals[1]);
		ArrayList<Integer> list= new ArrayList<Integer>();
		for (int i = 0;i<c;i++) {
			String wfeihu = a.nextLine();
			String nums = a.nextLine();
			String[] d = nums.split(" ");
			for (int j=0;j<d.length;j++) {
				int p = Integer.parseInt(d[j]);
				if (!list.contains(p)) {
					list.add(p);
				}
			}
		}
		System.out.println(comp-list.size());
	}
		
}
