import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.HashSet;
import java.util.Set;

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

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        String[] in = br.readLine().split(" ");
        int n = Integer.parseInt(in[0]);
        int k = Integer.parseInt(in[1]);

        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(br.readLine());
            in = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                set.add(Integer.parseInt(in[j]));
            }
        }

        br.close();

        bw.write(String.valueOf(n - set.size()));

        bw.flush();

    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.BufferedWriter; BufferedWriter java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStreamWriter; OutputStreamWriter java.io import java.util.HashSet; HashSet java.util import java.util.Set; Set java.util public class Main {
    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        String[] in = br.readLine().split(" ");
        int n = Integer.parseInt(in[0]);
        int k = Integer.parseInt(in[1]);

        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(br.readLine());
            in = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                set.add(Integer.parseInt(in[j]));
            }
        }

        br.close();

        bw.write(String.valueOf(n - set.size()));

        bw.flush();

    }
} Main public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        String[] in = br.readLine().split(" ");
        int n = Integer.parseInt(in[0]);
        int k = Integer.parseInt(in[1]);

        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(br.readLine());
            in = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                set.add(Integer.parseInt(in[j]));
            }
        }

        br.close();

        bw.write(String.valueOf(n - set.size()));

        bw.flush();

    } main {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        String[] in = br.readLine().split(" ");
        int n = Integer.parseInt(in[0]);
        int k = Integer.parseInt(in[1]);

        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(br.readLine());
            in = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                set.add(Integer.parseInt(in[j]));
            }
        }

        br.close();

        bw.write(String.valueOf(n - set.size()));

        bw.flush();

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); bw new BufferedWriter(new OutputStreamWriter(System.out)) String[] in = br.readLine().split(" "); in br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(in[0]); n Integer.parseInt(in[0]) Integer.parseInt Integer in[0] in 0 int k = Integer.parseInt(in[1]); k Integer.parseInt(in[1]) Integer.parseInt Integer in[1] in 1 Set<Integer> set = new HashSet<>(); set new HashSet<>() for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(br.readLine());
            in = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                set.add(Integer.parseInt(in[j]));
            }
        } int i = 0; int i = 0; i 0 i < k i k i++ i++ i {
            int d = Integer.parseInt(br.readLine());
            in = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                set.add(Integer.parseInt(in[j]));
            }
        } {
            int d = Integer.parseInt(br.readLine());
            in = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                set.add(Integer.parseInt(in[j]));
            }
        } int d = Integer.parseInt(br.readLine()); d Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br in = br.readLine().split(" ") in br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for (int j = 0; j < d; j++) {
                set.add(Integer.parseInt(in[j]));
            } int j = 0; int j = 0; j 0 j < d j d j++ j++ j {
                set.add(Integer.parseInt(in[j]));
            } {
                set.add(Integer.parseInt(in[j]));
            } set.add(Integer.parseInt(in[j])) set.add set Integer.parseInt(in[j]) Integer.parseInt Integer in[j] in j br.close() br.close br bw.write(String.valueOf(n - set.size())) bw.write bw String.valueOf(n - set.size()) String.valueOf String n - set.size() n set.size() set.size set bw.flush() bw.flush bw String[] args args public class Main {
    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        String[] in = br.readLine().split(" ");
        int n = Integer.parseInt(in[0]);
        int k = Integer.parseInt(in[1]);

        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(br.readLine());
            in = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                set.add(Integer.parseInt(in[j]));
            }
        }

        br.close();

        bw.write(String.valueOf(n - set.size()));

        bw.flush();

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

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        String[] in = br.readLine().split(" ");
        int n = Integer.parseInt(in[0]);
        int k = Integer.parseInt(in[1]);

        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(br.readLine());
            in = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                set.add(Integer.parseInt(in[j]));
            }
        }

        br.close();

        bw.write(String.valueOf(n - set.size()));

        bw.flush();

    }
} Main
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.HashSet;
import java.util.Set;

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

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        String[] in = br.readLine().split(" ");
        int n = Integer.parseInt(in[0]);
        int k = Integer.parseInt(in[1]);

        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < k; i++) {
            int d = Integer.parseInt(br.readLine());
            in = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                set.add(Integer.parseInt(in[j]));
            }
        }

        br.close();

        bw.write(String.valueOf(n - set.size()));

        bw.flush();

    }
}