import java.util.Scanner;

class Main {

    public static void main(String[] args) {
       Scanner stdIn=new Scanner(System.in);
       
       int N=stdIn.nextInt();
       int K=stdIn.nextInt();
       int []c=new int[N];
       int count=0;

       
       int []d=new int[K];
       for(int i=0; i<c.length; i++){
           c[i]=0;
       }

       for(int i=0; i<K; i++){
           d[i]=stdIn.nextInt();
           int []a=new int[d[i]];
           for(int j=0; j<d[i]; j++){
                a[j]=stdIn.nextInt();
           }
           for(int k=0; k<d[i]; k++){
                c[a[k]-1]++;
           }
        }
        for(int i=0; i<c.length; i++){
            if(c[i]==0){
                count++;
            }
        }
        System.out.println(count);
        
        
        
    }

} import java.util.Scanner; Scanner java.util class Main {

    public static void main(String[] args) {
       Scanner stdIn=new Scanner(System.in);
       
       int N=stdIn.nextInt();
       int K=stdIn.nextInt();
       int []c=new int[N];
       int count=0;

       
       int []d=new int[K];
       for(int i=0; i<c.length; i++){
           c[i]=0;
       }

       for(int i=0; i<K; i++){
           d[i]=stdIn.nextInt();
           int []a=new int[d[i]];
           for(int j=0; j<d[i]; j++){
                a[j]=stdIn.nextInt();
           }
           for(int k=0; k<d[i]; k++){
                c[a[k]-1]++;
           }
        }
        for(int i=0; i<c.length; i++){
            if(c[i]==0){
                count++;
            }
        }
        System.out.println(count);
        
        
        
    }

} Main public static void main(String[] args) {
       Scanner stdIn=new Scanner(System.in);
       
       int N=stdIn.nextInt();
       int K=stdIn.nextInt();
       int []c=new int[N];
       int count=0;

       
       int []d=new int[K];
       for(int i=0; i<c.length; i++){
           c[i]=0;
       }

       for(int i=0; i<K; i++){
           d[i]=stdIn.nextInt();
           int []a=new int[d[i]];
           for(int j=0; j<d[i]; j++){
                a[j]=stdIn.nextInt();
           }
           for(int k=0; k<d[i]; k++){
                c[a[k]-1]++;
           }
        }
        for(int i=0; i<c.length; i++){
            if(c[i]==0){
                count++;
            }
        }
        System.out.println(count);
        
        
        
    } main {
       Scanner stdIn=new Scanner(System.in);
       
       int N=stdIn.nextInt();
       int K=stdIn.nextInt();
       int []c=new int[N];
       int count=0;

       
       int []d=new int[K];
       for(int i=0; i<c.length; i++){
           c[i]=0;
       }

       for(int i=0; i<K; i++){
           d[i]=stdIn.nextInt();
           int []a=new int[d[i]];
           for(int j=0; j<d[i]; j++){
                a[j]=stdIn.nextInt();
           }
           for(int k=0; k<d[i]; k++){
                c[a[k]-1]++;
           }
        }
        for(int i=0; i<c.length; i++){
            if(c[i]==0){
                count++;
            }
        }
        System.out.println(count);
        
        
        
    } Scanner stdIn=new Scanner(System.in); stdIn new Scanner(System.in) int N=stdIn.nextInt(); N stdIn.nextInt() stdIn.nextInt stdIn int K=stdIn.nextInt(); K stdIn.nextInt() stdIn.nextInt stdIn int []c=new int[N]; c new int[N] N int count=0; count 0 int []d=new int[K]; d new int[K] K for(int i=0; i<c.length; i++){
           c[i]=0;
       } int i=0; int i=0; i 0 i<c.length i c.length c c.length i++ i++ i {
           c[i]=0;
       } {
           c[i]=0;
       } c[i]=0 c[i] c i 0 for(int i=0; i<K; i++){
           d[i]=stdIn.nextInt();
           int []a=new int[d[i]];
           for(int j=0; j<d[i]; j++){
                a[j]=stdIn.nextInt();
           }
           for(int k=0; k<d[i]; k++){
                c[a[k]-1]++;
           }
        } int i=0; int i=0; i 0 i<K i K i++ i++ i {
           d[i]=stdIn.nextInt();
           int []a=new int[d[i]];
           for(int j=0; j<d[i]; j++){
                a[j]=stdIn.nextInt();
           }
           for(int k=0; k<d[i]; k++){
                c[a[k]-1]++;
           }
        } {
           d[i]=stdIn.nextInt();
           int []a=new int[d[i]];
           for(int j=0; j<d[i]; j++){
                a[j]=stdIn.nextInt();
           }
           for(int k=0; k<d[i]; k++){
                c[a[k]-1]++;
           }
        } d[i]=stdIn.nextInt() d[i] d i stdIn.nextInt() stdIn.nextInt stdIn 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]=stdIn.nextInt();
           } int j=0; int j=0; j 0 j<d[i] j d[i] d i j++ j++ j {
                a[j]=stdIn.nextInt();
           } {
                a[j]=stdIn.nextInt();
           } a[j]=stdIn.nextInt() a[j] a j stdIn.nextInt() stdIn.nextInt stdIn for(int k=0; k<d[i]; k++){
                c[a[k]-1]++;
           } int k=0; int k=0; k 0 k<d[i] k d[i] d i k++ k++ k {
                c[a[k]-1]++;
           } {
                c[a[k]-1]++;
           } c[a[k]-1]++ c[a[k]-1] c a[k]-1 a[k] a k 1 for(int i=0; i<c.length; i++){
            if(c[i]==0){
                count++;
            }
        } int i=0; int i=0; i 0 i<c.length i c.length c c.length i++ i++ i {
            if(c[i]==0){
                count++;
            }
        } {
            if(c[i]==0){
                count++;
            }
        } if(c[i]==0){
                count++;
            } c[i]==0 c[i] c i 0 {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.Scanner;

class Main {

    public static void main(String[] args) {
       Scanner stdIn=new Scanner(System.in);
       
       int N=stdIn.nextInt();
       int K=stdIn.nextInt();
       int []c=new int[N];
       int count=0;

       
       int []d=new int[K];
       for(int i=0; i<c.length; i++){
           c[i]=0;
       }

       for(int i=0; i<K; i++){
           d[i]=stdIn.nextInt();
           int []a=new int[d[i]];
           for(int j=0; j<d[i]; j++){
                a[j]=stdIn.nextInt();
           }
           for(int k=0; k<d[i]; k++){
                c[a[k]-1]++;
           }
        }
        for(int i=0; i<c.length; i++){
            if(c[i]==0){
                count++;
            }
        }
        System.out.println(count);
        
        
        
    }

}