import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();

        Set<Integer> set = new HashSet<>();

        for (int i = 0 ; i < K ; i++) {
            int d = scanner.nextInt();

            for (int j = 0 ; j < d ; j++) {
                int a = scanner.nextInt();
                set.add(a);
            }
        }

        System.out.println(N - set.size());
    }
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();

        Set<Integer> set = new HashSet<>();

        for (int i = 0 ; i < K ; i++) {
            int d = scanner.nextInt();

            for (int j = 0 ; j < d ; j++) {
                int a = scanner.nextInt();
                set.add(a);
            }
        }

        System.out.println(N - set.size());
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();

        Set<Integer> set = new HashSet<>();

        for (int i = 0 ; i < K ; i++) {
            int d = scanner.nextInt();

            for (int j = 0 ; j < d ; j++) {
                int a = scanner.nextInt();
                set.add(a);
            }
        }

        System.out.println(N - set.size());
    } main {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();

        Set<Integer> set = new HashSet<>();

        for (int i = 0 ; i < K ; i++) {
            int d = scanner.nextInt();

            for (int j = 0 ; j < d ; j++) {
                int a = scanner.nextInt();
                set.add(a);
            }
        }

        System.out.println(N - set.size());
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int K = scanner.nextInt(); K scanner.nextInt() scanner.nextInt scanner Set<Integer> set = new HashSet<>(); set new HashSet<>() for (int i = 0 ; i < K ; i++) {
            int d = scanner.nextInt();

            for (int j = 0 ; j < d ; j++) {
                int a = scanner.nextInt();
                set.add(a);
            }
        } int i = 0 ; int i = 0 ; i 0 i < K i K i++ i++ i {
            int d = scanner.nextInt();

            for (int j = 0 ; j < d ; j++) {
                int a = scanner.nextInt();
                set.add(a);
            }
        } {
            int d = scanner.nextInt();

            for (int j = 0 ; j < d ; j++) {
                int a = scanner.nextInt();
                set.add(a);
            }
        } int d = scanner.nextInt(); d scanner.nextInt() scanner.nextInt scanner for (int j = 0 ; j < d ; j++) {
                int a = scanner.nextInt();
                set.add(a);
            } int j = 0 ; int j = 0 ; j 0 j < d j d j++ j++ j {
                int a = scanner.nextInt();
                set.add(a);
            } {
                int a = scanner.nextInt();
                set.add(a);
            } int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner set.add(a) set.add set a System.out.println(N - set.size()) System.out.println System.out System System.out N - set.size() N set.size() set.size set String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();

        Set<Integer> set = new HashSet<>();

        for (int i = 0 ; i < K ; i++) {
            int d = scanner.nextInt();

            for (int j = 0 ; j < d ; j++) {
                int a = scanner.nextInt();
                set.add(a);
            }
        }

        System.out.println(N - set.size());
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();

        Set<Integer> set = new HashSet<>();

        for (int i = 0 ; i < K ; i++) {
            int d = scanner.nextInt();

            for (int j = 0 ; j < d ; j++) {
                int a = scanner.nextInt();
                set.add(a);
            }
        }

        System.out.println(N - set.size());
    }
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int K = scanner.nextInt();

        Set<Integer> set = new HashSet<>();

        for (int i = 0 ; i < K ; i++) {
            int d = scanner.nextInt();

            for (int j = 0 ; j < d ; j++) {
                int a = scanner.nextInt();
                set.add(a);
            }
        }

        System.out.println(N - set.size());
    }
}
