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

public class Main {
    public static void main(final String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[] d = new int[K];
        Set<String> A = new HashSet<>();
        for (int i = 0; i < K; i++) {
            d[i] = sc.nextInt();
            for (int j = 0; j < d[i]; j++) {
                A.add(sc.next());
            }
        }
        sc.close();

        System.out.println(N - A.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(final String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[] d = new int[K];
        Set<String> A = new HashSet<>();
        for (int i = 0; i < K; i++) {
            d[i] = sc.nextInt();
            for (int j = 0; j < d[i]; j++) {
                A.add(sc.next());
            }
        }
        sc.close();

        System.out.println(N - A.size());
    }
} Main public static void main(final String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[] d = new int[K];
        Set<String> A = new HashSet<>();
        for (int i = 0; i < K; i++) {
            d[i] = sc.nextInt();
            for (int j = 0; j < d[i]; j++) {
                A.add(sc.next());
            }
        }
        sc.close();

        System.out.println(N - A.size());
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[] d = new int[K];
        Set<String> A = new HashSet<>();
        for (int i = 0; i < K; i++) {
            d[i] = sc.nextInt();
            for (int j = 0; j < d[i]; j++) {
                A.add(sc.next());
            }
        }
        sc.close();

        System.out.println(N - A.size());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc int[] d = new int[K]; d new int[K] K Set<String> A = new HashSet<>(); A new HashSet<>() for (int i = 0; i < K; i++) {
            d[i] = sc.nextInt();
            for (int j = 0; j < d[i]; j++) {
                A.add(sc.next());
            }
        } int i = 0; int i = 0; i 0 i < K i K i++ i++ i {
            d[i] = sc.nextInt();
            for (int j = 0; j < d[i]; j++) {
                A.add(sc.next());
            }
        } {
            d[i] = sc.nextInt();
            for (int j = 0; j < d[i]; j++) {
                A.add(sc.next());
            }
        } d[i] = sc.nextInt() d[i] d i sc.nextInt() sc.nextInt sc for (int j = 0; j < d[i]; j++) {
                A.add(sc.next());
            } int j = 0; int j = 0; j 0 j < d[i] j d[i] d i j++ j++ j {
                A.add(sc.next());
            } {
                A.add(sc.next());
            } A.add(sc.next()) A.add A sc.next() sc.next sc sc.close() sc.close sc System.out.println(N - A.size()) System.out.println System.out System System.out N - A.size() N A.size() A.size A final String[] args args public class Main {
    public static void main(final String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[] d = new int[K];
        Set<String> A = new HashSet<>();
        for (int i = 0; i < K; i++) {
            d[i] = sc.nextInt();
            for (int j = 0; j < d[i]; j++) {
                A.add(sc.next());
            }
        }
        sc.close();

        System.out.println(N - A.size());
    }
} public class Main {
    public static void main(final String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[] d = new int[K];
        Set<String> A = new HashSet<>();
        for (int i = 0; i < K; i++) {
            d[i] = sc.nextInt();
            for (int j = 0; j < d[i]; j++) {
                A.add(sc.next());
            }
        }
        sc.close();

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

public class Main {
    public static void main(final String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        int[] d = new int[K];
        Set<String> A = new HashSet<>();
        for (int i = 0; i < K; i++) {
            d[i] = sc.nextInt();
            for (int j = 0; j < d[i]; j++) {
                A.add(sc.next());
            }
        }
        sc.close();

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