import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    static int n = 0;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a = sc.nextInt();
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n; i++) {
            list.add(0);
        }

        for (int i = 0; i < a; i++) {
            int b = sc.nextInt();
            for (int j = 0; j < b; j++) {
                int tmp = sc.nextInt();
                list.set(tmp - 1, 1);
            }
        }

        int ans = 0;
        for (int x : list) {
            ans += x;
        }

        System.out.println(n - ans);
    }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
    static int n = 0;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a = sc.nextInt();
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n; i++) {
            list.add(0);
        }

        for (int i = 0; i < a; i++) {
            int b = sc.nextInt();
            for (int j = 0; j < b; j++) {
                int tmp = sc.nextInt();
                list.set(tmp - 1, 1);
            }
        }

        int ans = 0;
        for (int x : list) {
            ans += x;
        }

        System.out.println(n - ans);
    }
} Main static int n = 0; n 0 public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a = sc.nextInt();
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n; i++) {
            list.add(0);
        }

        for (int i = 0; i < a; i++) {
            int b = sc.nextInt();
            for (int j = 0; j < b; j++) {
                int tmp = sc.nextInt();
                list.set(tmp - 1, 1);
            }
        }

        int ans = 0;
        for (int x : list) {
            ans += x;
        }

        System.out.println(n - ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a = sc.nextInt();
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n; i++) {
            list.add(0);
        }

        for (int i = 0; i < a; i++) {
            int b = sc.nextInt();
            for (int j = 0; j < b; j++) {
                int tmp = sc.nextInt();
                list.set(tmp - 1, 1);
            }
        }

        int ans = 0;
        for (int x : list) {
            ans += x;
        }

        System.out.println(n - ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() for (int i = 0; i < n; i++) {
            list.add(0);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            list.add(0);
        } {
            list.add(0);
        } list.add(0) list.add list 0 for (int i = 0; i < a; i++) {
            int b = sc.nextInt();
            for (int j = 0; j < b; j++) {
                int tmp = sc.nextInt();
                list.set(tmp - 1, 1);
            }
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
            int b = sc.nextInt();
            for (int j = 0; j < b; j++) {
                int tmp = sc.nextInt();
                list.set(tmp - 1, 1);
            }
        } {
            int b = sc.nextInt();
            for (int j = 0; j < b; j++) {
                int tmp = sc.nextInt();
                list.set(tmp - 1, 1);
            }
        } int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc for (int j = 0; j < b; j++) {
                int tmp = sc.nextInt();
                list.set(tmp - 1, 1);
            } int j = 0; int j = 0; j 0 j < b j b j++ j++ j {
                int tmp = sc.nextInt();
                list.set(tmp - 1, 1);
            } {
                int tmp = sc.nextInt();
                list.set(tmp - 1, 1);
            } int tmp = sc.nextInt(); tmp sc.nextInt() sc.nextInt sc list.set(tmp - 1, 1) list.set list tmp - 1 tmp 1 1 int ans = 0; ans 0 for (int x : list) {
            ans += x;
        } int x list {
            ans += x;
        } {
            ans += x;
        } ans += x ans x System.out.println(n - ans) System.out.println System.out System System.out n - ans n ans String[] args args public class Main {
    static int n = 0;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a = sc.nextInt();
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n; i++) {
            list.add(0);
        }

        for (int i = 0; i < a; i++) {
            int b = sc.nextInt();
            for (int j = 0; j < b; j++) {
                int tmp = sc.nextInt();
                list.set(tmp - 1, 1);
            }
        }

        int ans = 0;
        for (int x : list) {
            ans += x;
        }

        System.out.println(n - ans);
    }
} public class Main {
    static int n = 0;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a = sc.nextInt();
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n; i++) {
            list.add(0);
        }

        for (int i = 0; i < a; i++) {
            int b = sc.nextInt();
            for (int j = 0; j < b; j++) {
                int tmp = sc.nextInt();
                list.set(tmp - 1, 1);
            }
        }

        int ans = 0;
        for (int x : list) {
            ans += x;
        }

        System.out.println(n - ans);
    }
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    static int n = 0;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a = sc.nextInt();
        List<Integer> list = new ArrayList<Integer>();

        for (int i = 0; i < n; i++) {
            list.add(0);
        }

        for (int i = 0; i < a; i++) {
            int b = sc.nextInt();
            for (int j = 0; j < b; j++) {
                int tmp = sc.nextInt();
                list.set(tmp - 1, 1);
            }
        }

        int ans = 0;
        for (int x : list) {
            ans += x;
        }

        System.out.println(n - ans);
    }
}