import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer k = Integer.parseInt(scanner.next());
        Integer da[][] = new Integer[k][];
        Boolean[] total = new Boolean[n];

        for(int i= 0; i < n; i++) {
            total[i] = false;
        }

        for(int i = 0; i < k; i++) {
            int tmp = Integer.parseInt(scanner.next());
            ArrayList list = new ArrayList();
            for(int j = 0; j < tmp; j++) {
               list.add(Integer.parseInt(scanner.next()));
            }
            da[i] = (Integer[])list.toArray(new Integer[tmp]);
        }

        for(int i = 0; i < da.length; i++) {
            for(int j = 0; j < da[i].length; j++) {
                total[da[i][j] -1] = true;
            }
        }
        int count = 0;
        for(int i =0; i < total.length; i++){
            if(total[i] == false) count++;
        }

        System.out.println(count);
    }
} import java.lang.reflect.Array; Array java.lang.reflect import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer k = Integer.parseInt(scanner.next());
        Integer da[][] = new Integer[k][];
        Boolean[] total = new Boolean[n];

        for(int i= 0; i < n; i++) {
            total[i] = false;
        }

        for(int i = 0; i < k; i++) {
            int tmp = Integer.parseInt(scanner.next());
            ArrayList list = new ArrayList();
            for(int j = 0; j < tmp; j++) {
               list.add(Integer.parseInt(scanner.next()));
            }
            da[i] = (Integer[])list.toArray(new Integer[tmp]);
        }

        for(int i = 0; i < da.length; i++) {
            for(int j = 0; j < da[i].length; j++) {
                total[da[i][j] -1] = true;
            }
        }
        int count = 0;
        for(int i =0; i < total.length; i++){
            if(total[i] == false) count++;
        }

        System.out.println(count);
    }
} Main public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer k = Integer.parseInt(scanner.next());
        Integer da[][] = new Integer[k][];
        Boolean[] total = new Boolean[n];

        for(int i= 0; i < n; i++) {
            total[i] = false;
        }

        for(int i = 0; i < k; i++) {
            int tmp = Integer.parseInt(scanner.next());
            ArrayList list = new ArrayList();
            for(int j = 0; j < tmp; j++) {
               list.add(Integer.parseInt(scanner.next()));
            }
            da[i] = (Integer[])list.toArray(new Integer[tmp]);
        }

        for(int i = 0; i < da.length; i++) {
            for(int j = 0; j < da[i].length; j++) {
                total[da[i][j] -1] = true;
            }
        }
        int count = 0;
        for(int i =0; i < total.length; i++){
            if(total[i] == false) count++;
        }

        System.out.println(count);
    } main {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer k = Integer.parseInt(scanner.next());
        Integer da[][] = new Integer[k][];
        Boolean[] total = new Boolean[n];

        for(int i= 0; i < n; i++) {
            total[i] = false;
        }

        for(int i = 0; i < k; i++) {
            int tmp = Integer.parseInt(scanner.next());
            ArrayList list = new ArrayList();
            for(int j = 0; j < tmp; j++) {
               list.add(Integer.parseInt(scanner.next()));
            }
            da[i] = (Integer[])list.toArray(new Integer[tmp]);
        }

        for(int i = 0; i < da.length; i++) {
            for(int j = 0; j < da[i].length; j++) {
                total[da[i][j] -1] = true;
            }
        }
        int count = 0;
        for(int i =0; i < total.length; i++){
            if(total[i] == false) count++;
        }

        System.out.println(count);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) Integer n = Integer.parseInt(scanner.next()); n Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner Integer k = Integer.parseInt(scanner.next()); k Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner Integer da[][] = new Integer[k][]; da new Integer[k][] k Boolean[] total = new Boolean[n]; total new Boolean[n] n for(int i= 0; i < n; i++) {
            total[i] = false;
        } int i= 0; int i= 0; i 0 i < n i n i++ i++ i {
            total[i] = false;
        } {
            total[i] = false;
        } total[i] = false total[i] total i false for(int i = 0; i < k; i++) {
            int tmp = Integer.parseInt(scanner.next());
            ArrayList list = new ArrayList();
            for(int j = 0; j < tmp; j++) {
               list.add(Integer.parseInt(scanner.next()));
            }
            da[i] = (Integer[])list.toArray(new Integer[tmp]);
        } int i = 0; int i = 0; i 0 i < k i k i++ i++ i {
            int tmp = Integer.parseInt(scanner.next());
            ArrayList list = new ArrayList();
            for(int j = 0; j < tmp; j++) {
               list.add(Integer.parseInt(scanner.next()));
            }
            da[i] = (Integer[])list.toArray(new Integer[tmp]);
        } {
            int tmp = Integer.parseInt(scanner.next());
            ArrayList list = new ArrayList();
            for(int j = 0; j < tmp; j++) {
               list.add(Integer.parseInt(scanner.next()));
            }
            da[i] = (Integer[])list.toArray(new Integer[tmp]);
        } int tmp = Integer.parseInt(scanner.next()); tmp Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner ArrayList list = new ArrayList(); list new ArrayList() for(int j = 0; j < tmp; j++) {
               list.add(Integer.parseInt(scanner.next()));
            } int j = 0; int j = 0; j 0 j < tmp j tmp j++ j++ j {
               list.add(Integer.parseInt(scanner.next()));
            } {
               list.add(Integer.parseInt(scanner.next()));
            } list.add(Integer.parseInt(scanner.next())) list.add list Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner da[i] = (Integer[])list.toArray(new Integer[tmp]) da[i] da i (Integer[])list.toArray(new Integer[tmp]) list.toArray list new Integer[tmp] tmp for(int i = 0; i < da.length; i++) {
            for(int j = 0; j < da[i].length; j++) {
                total[da[i][j] -1] = true;
            }
        } int i = 0; int i = 0; i 0 i < da.length i da.length da da.length i++ i++ i {
            for(int j = 0; j < da[i].length; j++) {
                total[da[i][j] -1] = true;
            }
        } {
            for(int j = 0; j < da[i].length; j++) {
                total[da[i][j] -1] = true;
            }
        } for(int j = 0; j < da[i].length; j++) {
                total[da[i][j] -1] = true;
            } int j = 0; int j = 0; j 0 j < da[i].length j da[i].length da[i] da i da[i].length j++ j++ j {
                total[da[i][j] -1] = true;
            } {
                total[da[i][j] -1] = true;
            } total[da[i][j] -1] = true total[da[i][j] -1] total da[i][j] -1 da[i][j] da[i] da i j 1 true int count = 0; count 0 for(int i =0; i < total.length; i++){
            if(total[i] == false) count++;
        } int i =0; int i =0; i 0 i < total.length i total.length total total.length i++ i++ i {
            if(total[i] == false) count++;
        } {
            if(total[i] == false) count++;
        } if(total[i] == false) count++; total[i] == false total[i] total i false count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer k = Integer.parseInt(scanner.next());
        Integer da[][] = new Integer[k][];
        Boolean[] total = new Boolean[n];

        for(int i= 0; i < n; i++) {
            total[i] = false;
        }

        for(int i = 0; i < k; i++) {
            int tmp = Integer.parseInt(scanner.next());
            ArrayList list = new ArrayList();
            for(int j = 0; j < tmp; j++) {
               list.add(Integer.parseInt(scanner.next()));
            }
            da[i] = (Integer[])list.toArray(new Integer[tmp]);
        }

        for(int i = 0; i < da.length; i++) {
            for(int j = 0; j < da[i].length; j++) {
                total[da[i][j] -1] = true;
            }
        }
        int count = 0;
        for(int i =0; i < total.length; i++){
            if(total[i] == false) count++;
        }

        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer k = Integer.parseInt(scanner.next());
        Integer da[][] = new Integer[k][];
        Boolean[] total = new Boolean[n];

        for(int i= 0; i < n; i++) {
            total[i] = false;
        }

        for(int i = 0; i < k; i++) {
            int tmp = Integer.parseInt(scanner.next());
            ArrayList list = new ArrayList();
            for(int j = 0; j < tmp; j++) {
               list.add(Integer.parseInt(scanner.next()));
            }
            da[i] = (Integer[])list.toArray(new Integer[tmp]);
        }

        for(int i = 0; i < da.length; i++) {
            for(int j = 0; j < da[i].length; j++) {
                total[da[i][j] -1] = true;
            }
        }
        int count = 0;
        for(int i =0; i < total.length; i++){
            if(total[i] == false) count++;
        }

        System.out.println(count);
    }
} Main
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer n = Integer.parseInt(scanner.next());
        Integer k = Integer.parseInt(scanner.next());
        Integer da[][] = new Integer[k][];
        Boolean[] total = new Boolean[n];

        for(int i= 0; i < n; i++) {
            total[i] = false;
        }

        for(int i = 0; i < k; i++) {
            int tmp = Integer.parseInt(scanner.next());
            ArrayList list = new ArrayList();
            for(int j = 0; j < tmp; j++) {
               list.add(Integer.parseInt(scanner.next()));
            }
            da[i] = (Integer[])list.toArray(new Integer[tmp]);
        }

        for(int i = 0; i < da.length; i++) {
            for(int j = 0; j < da[i].length; j++) {
                total[da[i][j] -1] = true;
            }
        }
        int count = 0;
        for(int i =0; i < total.length; i++){
            if(total[i] == false) count++;
        }

        System.out.println(count);
    }
}
