import java.util.HashSet;
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int d[] = new int[k];
        HashSet<Integer> result = new HashSet<Integer>();
        for(int i=0;i<k;i++) {
        	d[i]=sc.nextInt();
        	int a[] = new int[d[i]];
        	for(int j=0;j<d[i];j++) {
        		a[j] = sc.nextInt();
        		result.add(a[j]);
        	}
        }
        System.out.println(n-result.size());
    	sc.close();
	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int d[] = new int[k];
        HashSet<Integer> result = new HashSet<Integer>();
        for(int i=0;i<k;i++) {
        	d[i]=sc.nextInt();
        	int a[] = new int[d[i]];
        	for(int j=0;j<d[i];j++) {
        		a[j] = sc.nextInt();
        		result.add(a[j]);
        	}
        }
        System.out.println(n-result.size());
    	sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int d[] = new int[k];
        HashSet<Integer> result = new HashSet<Integer>();
        for(int i=0;i<k;i++) {
        	d[i]=sc.nextInt();
        	int a[] = new int[d[i]];
        	for(int j=0;j<d[i];j++) {
        		a[j] = sc.nextInt();
        		result.add(a[j]);
        	}
        }
        System.out.println(n-result.size());
    	sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int d[] = new int[k];
        HashSet<Integer> result = new HashSet<Integer>();
        for(int i=0;i<k;i++) {
        	d[i]=sc.nextInt();
        	int a[] = new int[d[i]];
        	for(int j=0;j<d[i];j++) {
        		a[j] = sc.nextInt();
        		result.add(a[j]);
        	}
        }
        System.out.println(n-result.size());
    	sc.close();
	} 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 int d[] = new int[k]; d new int[k] k HashSet<Integer> result = new HashSet<Integer>(); result new HashSet<Integer>() for(int i=0;i<k;i++) {
        	d[i]=sc.nextInt();
        	int a[] = new int[d[i]];
        	for(int j=0;j<d[i];j++) {
        		a[j] = sc.nextInt();
        		result.add(a[j]);
        	}
        } int i=0; int i=0; i 0 i<k i k i++ i++ i {
        	d[i]=sc.nextInt();
        	int a[] = new int[d[i]];
        	for(int j=0;j<d[i];j++) {
        		a[j] = sc.nextInt();
        		result.add(a[j]);
        	}
        } {
        	d[i]=sc.nextInt();
        	int a[] = new int[d[i]];
        	for(int j=0;j<d[i];j++) {
        		a[j] = sc.nextInt();
        		result.add(a[j]);
        	}
        } d[i]=sc.nextInt() d[i] d i sc.nextInt() sc.nextInt sc int a[] = new int[d[i]]; a new int[d[i]] d[i] d i for(int j=0;j<d[i];j++) {
        		a[j] = sc.nextInt();
        		result.add(a[j]);
        	} int j=0; int j=0; j 0 j<d[i] j d[i] d i j++ j++ j {
        		a[j] = sc.nextInt();
        		result.add(a[j]);
        	} {
        		a[j] = sc.nextInt();
        		result.add(a[j]);
        	} a[j] = sc.nextInt() a[j] a j sc.nextInt() sc.nextInt sc result.add(a[j]) result.add result a[j] a j System.out.println(n-result.size()) System.out.println System.out System System.out n-result.size() n result.size() result.size result sc.close() sc.close sc String[] args args public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int d[] = new int[k];
        HashSet<Integer> result = new HashSet<Integer>();
        for(int i=0;i<k;i++) {
        	d[i]=sc.nextInt();
        	int a[] = new int[d[i]];
        	for(int j=0;j<d[i];j++) {
        		a[j] = sc.nextInt();
        		result.add(a[j]);
        	}
        }
        System.out.println(n-result.size());
    	sc.close();
	}
} public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int d[] = new int[k];
        HashSet<Integer> result = new HashSet<Integer>();
        for(int i=0;i<k;i++) {
        	d[i]=sc.nextInt();
        	int a[] = new int[d[i]];
        	for(int j=0;j<d[i];j++) {
        		a[j] = sc.nextInt();
        		result.add(a[j]);
        	}
        }
        System.out.println(n-result.size());
    	sc.close();
	}
} Main
import java.util.HashSet;
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int d[] = new int[k];
        HashSet<Integer> result = new HashSet<Integer>();
        for(int i=0;i<k;i++) {
        	d[i]=sc.nextInt();
        	int a[] = new int[d[i]];
        	for(int j=0;j<d[i];j++) {
        		a[j] = sc.nextInt();
        		result.add(a[j]);
        	}
        }
        System.out.println(n-result.size());
    	sc.close();
	}
}