import java.util.*;

public class Main{
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<Integer> set = new HashSet<Integer>();
        for(int i=0;i<N;i++){
            set.add(i+1);
        }
        int K = sc.nextInt();
        int [] d = new int [K];
        for(int i=0;i<K;i++){
            d[i] = sc.nextInt();
            for(int j=0;j<d[i];j++){
                Integer[] A = new Integer[d[i]];
                A[j] = sc.nextInt();
                set.remove(A[j]);
            }
            }
            System.out.println(set.size());
        }
    } import java.util.*; util.* java public class Main{
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<Integer> set = new HashSet<Integer>();
        for(int i=0;i<N;i++){
            set.add(i+1);
        }
        int K = sc.nextInt();
        int [] d = new int [K];
        for(int i=0;i<K;i++){
            d[i] = sc.nextInt();
            for(int j=0;j<d[i];j++){
                Integer[] A = new Integer[d[i]];
                A[j] = sc.nextInt();
                set.remove(A[j]);
            }
            }
            System.out.println(set.size());
        }
    } Main public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<Integer> set = new HashSet<Integer>();
        for(int i=0;i<N;i++){
            set.add(i+1);
        }
        int K = sc.nextInt();
        int [] d = new int [K];
        for(int i=0;i<K;i++){
            d[i] = sc.nextInt();
            for(int j=0;j<d[i];j++){
                Integer[] A = new Integer[d[i]];
                A[j] = sc.nextInt();
                set.remove(A[j]);
            }
            }
            System.out.println(set.size());
        } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<Integer> set = new HashSet<Integer>();
        for(int i=0;i<N;i++){
            set.add(i+1);
        }
        int K = sc.nextInt();
        int [] d = new int [K];
        for(int i=0;i<K;i++){
            d[i] = sc.nextInt();
            for(int j=0;j<d[i];j++){
                Integer[] A = new Integer[d[i]];
                A[j] = sc.nextInt();
                set.remove(A[j]);
            }
            }
            System.out.println(set.size());
        } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc Set<Integer> set = new HashSet<Integer>(); set new HashSet<Integer>() for(int i=0;i<N;i++){
            set.add(i+1);
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            set.add(i+1);
        } {
            set.add(i+1);
        } set.add(i+1) set.add set i+1 i 1 int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc int [] d = new int [K]; d new int [K] K for(int i=0;i<K;i++){
            d[i] = sc.nextInt();
            for(int j=0;j<d[i];j++){
                Integer[] A = new Integer[d[i]];
                A[j] = sc.nextInt();
                set.remove(A[j]);
            }
            } int i=0; int i=0; i 0 i<K i K i++ i++ i {
            d[i] = sc.nextInt();
            for(int j=0;j<d[i];j++){
                Integer[] A = new Integer[d[i]];
                A[j] = sc.nextInt();
                set.remove(A[j]);
            }
            } {
            d[i] = sc.nextInt();
            for(int j=0;j<d[i];j++){
                Integer[] A = new Integer[d[i]];
                A[j] = sc.nextInt();
                set.remove(A[j]);
            }
            } d[i] = sc.nextInt() d[i] d i sc.nextInt() sc.nextInt sc for(int j=0;j<d[i];j++){
                Integer[] A = new Integer[d[i]];
                A[j] = sc.nextInt();
                set.remove(A[j]);
            } int j=0; int j=0; j 0 j<d[i] j d[i] d i j++ j++ j {
                Integer[] A = new Integer[d[i]];
                A[j] = sc.nextInt();
                set.remove(A[j]);
            } {
                Integer[] A = new Integer[d[i]];
                A[j] = sc.nextInt();
                set.remove(A[j]);
            } Integer[] A = new Integer[d[i]]; A new Integer[d[i]] d[i] d i A[j] = sc.nextInt() A[j] A j sc.nextInt() sc.nextInt sc set.remove(A[j]) set.remove set A[j] A j System.out.println(set.size()) System.out.println System.out System System.out set.size() set.size set String[]args args public class Main{
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<Integer> set = new HashSet<Integer>();
        for(int i=0;i<N;i++){
            set.add(i+1);
        }
        int K = sc.nextInt();
        int [] d = new int [K];
        for(int i=0;i<K;i++){
            d[i] = sc.nextInt();
            for(int j=0;j<d[i];j++){
                Integer[] A = new Integer[d[i]];
                A[j] = sc.nextInt();
                set.remove(A[j]);
            }
            }
            System.out.println(set.size());
        }
    } public class Main{
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<Integer> set = new HashSet<Integer>();
        for(int i=0;i<N;i++){
            set.add(i+1);
        }
        int K = sc.nextInt();
        int [] d = new int [K];
        for(int i=0;i<K;i++){
            d[i] = sc.nextInt();
            for(int j=0;j<d[i];j++){
                Integer[] A = new Integer[d[i]];
                A[j] = sc.nextInt();
                set.remove(A[j]);
            }
            }
            System.out.println(set.size());
        }
    } Main
import java.util.*;

public class Main{
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        Set<Integer> set = new HashSet<Integer>();
        for(int i=0;i<N;i++){
            set.add(i+1);
        }
        int K = sc.nextInt();
        int [] d = new int [K];
        for(int i=0;i<K;i++){
            d[i] = sc.nextInt();
            for(int j=0;j<d[i];j++){
                Integer[] A = new Integer[d[i]];
                A[j] = sc.nextInt();
                set.remove(A[j]);
            }
            }
            System.out.println(set.size());
        }
    }
