import java.util.*;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        Set<String> hash = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hash.add(sc.next());
            }

        }

        System.out.println(n - hash.size());
    }
}
 import java.util.*; util.* java public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        Set<String> hash = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hash.add(sc.next());
            }

        }

        System.out.println(n - hash.size());
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        Set<String> hash = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hash.add(sc.next());
            }

        }

        System.out.println(n - hash.size());
    } main {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        Set<String> hash = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hash.add(sc.next());
            }

        }

        System.out.println(n - hash.size());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int k = Integer.parseInt(sc.next()); k Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc Set<String> hash = new HashSet<>(); hash new HashSet<>() for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hash.add(sc.next());
            }

        } int i = 0; int i = 0; i 0 i < k i k i++ i++ i {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hash.add(sc.next());
            }

        } {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hash.add(sc.next());
            }

        } int d = Integer.parseInt(sc.next()); d Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int j = 0; j < d; j++) {
                hash.add(sc.next());
            } int j = 0; int j = 0; j 0 j < d j d j++ j++ j {
                hash.add(sc.next());
            } {
                hash.add(sc.next());
            } hash.add(sc.next()) hash.add hash sc.next() sc.next sc System.out.println(n - hash.size()) System.out.println System.out System System.out n - hash.size() n hash.size() hash.size hash String[] args args public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        Set<String> hash = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hash.add(sc.next());
            }

        }

        System.out.println(n - hash.size());
    }
} public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        Set<String> hash = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hash.add(sc.next());
            }

        }

        System.out.println(n - hash.size());
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        Set<String> hash = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hash.add(sc.next());
            }

        }

        System.out.println(n - hash.size());
    }
}

