import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        boolean[] flag = new boolean[n];
        Arrays.fill(flag, false);

        for (int i = 0; i < k; i++) {

            int d = Integer.parseInt(s.next());
            for (int j = 0; j < d; j++) {
                int dn = Integer.parseInt(s.next());
                flag[dn - 1] = true;
            }
        }

        int count = 0;

        for (int i = 0; i < n; i++) {
            if (!flag[i])
                count++;
        }

        System.out.println(count);
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        boolean[] flag = new boolean[n];
        Arrays.fill(flag, false);

        for (int i = 0; i < k; i++) {

            int d = Integer.parseInt(s.next());
            for (int j = 0; j < d; j++) {
                int dn = Integer.parseInt(s.next());
                flag[dn - 1] = true;
            }
        }

        int count = 0;

        for (int i = 0; i < n; i++) {
            if (!flag[i])
                count++;
        }

        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        boolean[] flag = new boolean[n];
        Arrays.fill(flag, false);

        for (int i = 0; i < k; i++) {

            int d = Integer.parseInt(s.next());
            for (int j = 0; j < d; j++) {
                int dn = Integer.parseInt(s.next());
                flag[dn - 1] = true;
            }
        }

        int count = 0;

        for (int i = 0; i < n; i++) {
            if (!flag[i])
                count++;
        }

        System.out.println(count);
    } main {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        boolean[] flag = new boolean[n];
        Arrays.fill(flag, false);

        for (int i = 0; i < k; i++) {

            int d = Integer.parseInt(s.next());
            for (int j = 0; j < d; j++) {
                int dn = Integer.parseInt(s.next());
                flag[dn - 1] = true;
            }
        }

        int count = 0;

        for (int i = 0; i < n; i++) {
            if (!flag[i])
                count++;
        }

        System.out.println(count);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = Integer.parseInt(s.next()); n Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s int k = Integer.parseInt(s.next()); k Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s boolean[] flag = new boolean[n]; flag new boolean[n] n Arrays.fill(flag, false) Arrays.fill Arrays flag false for (int i = 0; i < k; i++) {

            int d = Integer.parseInt(s.next());
            for (int j = 0; j < d; j++) {
                int dn = Integer.parseInt(s.next());
                flag[dn - 1] = true;
            }
        } int i = 0; int i = 0; i 0 i < k i k i++ i++ i {

            int d = Integer.parseInt(s.next());
            for (int j = 0; j < d; j++) {
                int dn = Integer.parseInt(s.next());
                flag[dn - 1] = true;
            }
        } {

            int d = Integer.parseInt(s.next());
            for (int j = 0; j < d; j++) {
                int dn = Integer.parseInt(s.next());
                flag[dn - 1] = true;
            }
        } int d = Integer.parseInt(s.next()); d Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s for (int j = 0; j < d; j++) {
                int dn = Integer.parseInt(s.next());
                flag[dn - 1] = true;
            } int j = 0; int j = 0; j 0 j < d j d j++ j++ j {
                int dn = Integer.parseInt(s.next());
                flag[dn - 1] = true;
            } {
                int dn = Integer.parseInt(s.next());
                flag[dn - 1] = true;
            } int dn = Integer.parseInt(s.next()); dn Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s flag[dn - 1] = true flag[dn - 1] flag dn - 1 dn 1 true int count = 0; count 0 for (int i = 0; i < n; i++) {
            if (!flag[i])
                count++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (!flag[i])
                count++;
        } {
            if (!flag[i])
                count++;
        } if (!flag[i])
                count++; !flag[i] flag[i] flag i 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 s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        boolean[] flag = new boolean[n];
        Arrays.fill(flag, false);

        for (int i = 0; i < k; i++) {

            int d = Integer.parseInt(s.next());
            for (int j = 0; j < d; j++) {
                int dn = Integer.parseInt(s.next());
                flag[dn - 1] = true;
            }
        }

        int count = 0;

        for (int i = 0; i < n; i++) {
            if (!flag[i])
                count++;
        }

        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        boolean[] flag = new boolean[n];
        Arrays.fill(flag, false);

        for (int i = 0; i < k; i++) {

            int d = Integer.parseInt(s.next());
            for (int j = 0; j < d; j++) {
                int dn = Integer.parseInt(s.next());
                flag[dn - 1] = true;
            }
        }

        int count = 0;

        for (int i = 0; i < n; i++) {
            if (!flag[i])
                count++;
        }

        System.out.println(count);
    }
} Main
import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());

        boolean[] flag = new boolean[n];
        Arrays.fill(flag, false);

        for (int i = 0; i < k; i++) {

            int d = Integer.parseInt(s.next());
            for (int j = 0; j < d; j++) {
                int dn = Integer.parseInt(s.next());
                flag[dn - 1] = true;
            }
        }

        int count = 0;

        for (int i = 0; i < n; i++) {
            if (!flag[i])
                count++;
        }

        System.out.println(count);
    }
}