import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        Integer d[] = new Integer[k];
        Set<Integer> num = new HashSet<>();

        for( int i=0; i<k; i++ ){
            d[i] = sc.nextInt();
            Integer a[][] = new Integer[k][d[i]];

            for( int j=0; j<d[i]; j++ ){
                 a[i][j] = sc.nextInt();
                 num.add(a[i][j]);
            }
        }

        System.out.println( n-num.size() );

    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        Integer d[] = new Integer[k];
        Set<Integer> num = new HashSet<>();

        for( int i=0; i<k; i++ ){
            d[i] = sc.nextInt();
            Integer a[][] = new Integer[k][d[i]];

            for( int j=0; j<d[i]; j++ ){
                 a[i][j] = sc.nextInt();
                 num.add(a[i][j]);
            }
        }

        System.out.println( n-num.size() );

    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        Integer d[] = new Integer[k];
        Set<Integer> num = new HashSet<>();

        for( int i=0; i<k; i++ ){
            d[i] = sc.nextInt();
            Integer a[][] = new Integer[k][d[i]];

            for( int j=0; j<d[i]; j++ ){
                 a[i][j] = sc.nextInt();
                 num.add(a[i][j]);
            }
        }

        System.out.println( n-num.size() );

    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        Integer d[] = new Integer[k];
        Set<Integer> num = new HashSet<>();

        for( int i=0; i<k; i++ ){
            d[i] = sc.nextInt();
            Integer a[][] = new Integer[k][d[i]];

            for( int j=0; j<d[i]; j++ ){
                 a[i][j] = sc.nextInt();
                 num.add(a[i][j]);
            }
        }

        System.out.println( n-num.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 Integer d[] = new Integer[k]; d new Integer[k] k Set<Integer> num = new HashSet<>(); num new HashSet<>() for( int i=0; i<k; i++ ){
            d[i] = sc.nextInt();
            Integer a[][] = new Integer[k][d[i]];

            for( int j=0; j<d[i]; j++ ){
                 a[i][j] = sc.nextInt();
                 num.add(a[i][j]);
            }
        } int i=0; int i=0; i 0 i<k i k i++ i++ i {
            d[i] = sc.nextInt();
            Integer a[][] = new Integer[k][d[i]];

            for( int j=0; j<d[i]; j++ ){
                 a[i][j] = sc.nextInt();
                 num.add(a[i][j]);
            }
        } {
            d[i] = sc.nextInt();
            Integer a[][] = new Integer[k][d[i]];

            for( int j=0; j<d[i]; j++ ){
                 a[i][j] = sc.nextInt();
                 num.add(a[i][j]);
            }
        } d[i] = sc.nextInt() d[i] d i sc.nextInt() sc.nextInt sc Integer a[][] = new Integer[k][d[i]]; a new Integer[k][d[i]] k d[i] d i for( int j=0; j<d[i]; j++ ){
                 a[i][j] = sc.nextInt();
                 num.add(a[i][j]);
            } int j=0; int j=0; j 0 j<d[i] j d[i] d i j++ j++ j {
                 a[i][j] = sc.nextInt();
                 num.add(a[i][j]);
            } {
                 a[i][j] = sc.nextInt();
                 num.add(a[i][j]);
            } a[i][j] = sc.nextInt() a[i][j] a[i] a i j sc.nextInt() sc.nextInt sc num.add(a[i][j]) num.add num a[i][j] a[i] a i j System.out.println( n-num.size() ) System.out.println System.out System System.out n-num.size() n num.size() num.size num String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        Integer d[] = new Integer[k];
        Set<Integer> num = new HashSet<>();

        for( int i=0; i<k; i++ ){
            d[i] = sc.nextInt();
            Integer a[][] = new Integer[k][d[i]];

            for( int j=0; j<d[i]; j++ ){
                 a[i][j] = sc.nextInt();
                 num.add(a[i][j]);
            }
        }

        System.out.println( n-num.size() );

    }
}