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

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());
        HashSet<Integer> hs = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hs.add(Integer.parseInt(sc.next()));
            }
        }
        int answer = n - hs.size();
        System.out.println(answer);
        sc.close();
    }

} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner 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());
        HashSet<Integer> hs = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hs.add(Integer.parseInt(sc.next()));
            }
        }
        int answer = n - hs.size();
        System.out.println(answer);
        sc.close();
    }

} 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());
        HashSet<Integer> hs = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hs.add(Integer.parseInt(sc.next()));
            }
        }
        int answer = n - hs.size();
        System.out.println(answer);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int k = Integer.parseInt(sc.next());
        HashSet<Integer> hs = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hs.add(Integer.parseInt(sc.next()));
            }
        }
        int answer = n - hs.size();
        System.out.println(answer);
        sc.close();
    } 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 HashSet<Integer> hs = new HashSet<>(); hs new HashSet<>() for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hs.add(Integer.parseInt(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++) {
                hs.add(Integer.parseInt(sc.next()));
            }
        } {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hs.add(Integer.parseInt(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++) {
                hs.add(Integer.parseInt(sc.next()));
            } int j = 0; int j = 0; j 0 j < d j d j++ j++ j {
                hs.add(Integer.parseInt(sc.next()));
            } {
                hs.add(Integer.parseInt(sc.next()));
            } hs.add(Integer.parseInt(sc.next())) hs.add hs Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int answer = n - hs.size(); answer n - hs.size() n hs.size() hs.size hs System.out.println(answer) System.out.println System.out System System.out answer sc.close() sc.close sc 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());
        HashSet<Integer> hs = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hs.add(Integer.parseInt(sc.next()));
            }
        }
        int answer = n - hs.size();
        System.out.println(answer);
        sc.close();
    }

} 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());
        HashSet<Integer> hs = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hs.add(Integer.parseInt(sc.next()));
            }
        }
        int answer = n - hs.size();
        System.out.println(answer);
        sc.close();
    }

} Main
import java.util.HashSet;
import java.util.Scanner;

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());
        HashSet<Integer> hs = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                hs.add(Integer.parseInt(sc.next()));
            }
        }
        int answer = n - hs.size();
        System.out.println(answer);
        sc.close();
    }

}
