import java.util.*;

public class Main {

    public static void main(String args[]) {


        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.next());
        int k = Integer.parseInt(scan.next());

        Map<Integer, Boolean> map = new HashMap<>(k);

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

            int d = Integer.parseInt(scan.next());

            for (int j = 1; j<= d; j++) {


                int a = Integer.parseInt(scan.next());

                if (!map.containsKey(a)) {
                    map.put(a, true);
                }
            }
        }
        scan.close();

       int x= n-  map.size();

       System.out.println(String.valueOf(x));
    }
} import java.util.*; util.* java public class Main {

    public static void main(String args[]) {


        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.next());
        int k = Integer.parseInt(scan.next());

        Map<Integer, Boolean> map = new HashMap<>(k);

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

            int d = Integer.parseInt(scan.next());

            for (int j = 1; j<= d; j++) {


                int a = Integer.parseInt(scan.next());

                if (!map.containsKey(a)) {
                    map.put(a, true);
                }
            }
        }
        scan.close();

       int x= n-  map.size();

       System.out.println(String.valueOf(x));
    }
} Main public static void main(String args[]) {


        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.next());
        int k = Integer.parseInt(scan.next());

        Map<Integer, Boolean> map = new HashMap<>(k);

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

            int d = Integer.parseInt(scan.next());

            for (int j = 1; j<= d; j++) {


                int a = Integer.parseInt(scan.next());

                if (!map.containsKey(a)) {
                    map.put(a, true);
                }
            }
        }
        scan.close();

       int x= n-  map.size();

       System.out.println(String.valueOf(x));
    } main {


        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.next());
        int k = Integer.parseInt(scan.next());

        Map<Integer, Boolean> map = new HashMap<>(k);

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

            int d = Integer.parseInt(scan.next());

            for (int j = 1; j<= d; j++) {


                int a = Integer.parseInt(scan.next());

                if (!map.containsKey(a)) {
                    map.put(a, true);
                }
            }
        }
        scan.close();

       int x= n-  map.size();

       System.out.println(String.valueOf(x));
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = Integer.parseInt(scan.next()); n Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int k = Integer.parseInt(scan.next()); k Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan Map<Integer, Boolean> map = new HashMap<>(k); map new HashMap<>(k) for (int i = 1; i <= k; i++) {

            int d = Integer.parseInt(scan.next());

            for (int j = 1; j<= d; j++) {


                int a = Integer.parseInt(scan.next());

                if (!map.containsKey(a)) {
                    map.put(a, true);
                }
            }
        } int i = 1; int i = 1; i 1 i <= k i k i++ i++ i {

            int d = Integer.parseInt(scan.next());

            for (int j = 1; j<= d; j++) {


                int a = Integer.parseInt(scan.next());

                if (!map.containsKey(a)) {
                    map.put(a, true);
                }
            }
        } {

            int d = Integer.parseInt(scan.next());

            for (int j = 1; j<= d; j++) {


                int a = Integer.parseInt(scan.next());

                if (!map.containsKey(a)) {
                    map.put(a, true);
                }
            }
        } int d = Integer.parseInt(scan.next()); d Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan for (int j = 1; j<= d; j++) {


                int a = Integer.parseInt(scan.next());

                if (!map.containsKey(a)) {
                    map.put(a, true);
                }
            } int j = 1; int j = 1; j 1 j<= d j d j++ j++ j {


                int a = Integer.parseInt(scan.next());

                if (!map.containsKey(a)) {
                    map.put(a, true);
                }
            } {


                int a = Integer.parseInt(scan.next());

                if (!map.containsKey(a)) {
                    map.put(a, true);
                }
            } int a = Integer.parseInt(scan.next()); a Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan if (!map.containsKey(a)) {
                    map.put(a, true);
                } !map.containsKey(a) map.containsKey(a) map.containsKey map a {
                    map.put(a, true);
                } map.put(a, true) map.put map a true scan.close() scan.close scan int x= n-  map.size(); x n-  map.size() n map.size() map.size map System.out.println(String.valueOf(x)) System.out.println System.out System System.out String.valueOf(x) String.valueOf String x String args[] args public class Main {

    public static void main(String args[]) {


        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.next());
        int k = Integer.parseInt(scan.next());

        Map<Integer, Boolean> map = new HashMap<>(k);

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

            int d = Integer.parseInt(scan.next());

            for (int j = 1; j<= d; j++) {


                int a = Integer.parseInt(scan.next());

                if (!map.containsKey(a)) {
                    map.put(a, true);
                }
            }
        }
        scan.close();

       int x= n-  map.size();

       System.out.println(String.valueOf(x));
    }
} public class Main {

    public static void main(String args[]) {


        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.next());
        int k = Integer.parseInt(scan.next());

        Map<Integer, Boolean> map = new HashMap<>(k);

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

            int d = Integer.parseInt(scan.next());

            for (int j = 1; j<= d; j++) {


                int a = Integer.parseInt(scan.next());

                if (!map.containsKey(a)) {
                    map.put(a, true);
                }
            }
        }
        scan.close();

       int x= n-  map.size();

       System.out.println(String.valueOf(x));
    }
} Main
import java.util.*;

public class Main {

    public static void main(String args[]) {


        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.next());
        int k = Integer.parseInt(scan.next());

        Map<Integer, Boolean> map = new HashMap<>(k);

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

            int d = Integer.parseInt(scan.next());

            for (int j = 1; j<= d; j++) {


                int a = Integer.parseInt(scan.next());

                if (!map.containsKey(a)) {
                    map.put(a, true);
                }
            }
        }
        scan.close();

       int x= n-  map.size();

       System.out.println(String.valueOf(x));
    }
}