import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int k = Integer.parseInt(str[1]);
        boolean[] treated = new boolean[n];
        Arrays.fill(treated, false);
        int cnt = n;
        int d = 0;
        for (int i = 0; i < k; i++) {
            d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                }
            }
        }
        System.out.println(cnt);

    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int k = Integer.parseInt(str[1]);
        boolean[] treated = new boolean[n];
        Arrays.fill(treated, false);
        int cnt = n;
        int d = 0;
        for (int i = 0; i < k; i++) {
            d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                }
            }
        }
        System.out.println(cnt);

    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int k = Integer.parseInt(str[1]);
        boolean[] treated = new boolean[n];
        Arrays.fill(treated, false);
        int cnt = n;
        int d = 0;
        for (int i = 0; i < k; i++) {
            d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                }
            }
        }
        System.out.println(cnt);

    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int k = Integer.parseInt(str[1]);
        boolean[] treated = new boolean[n];
        Arrays.fill(treated, false);
        int cnt = n;
        int d = 0;
        for (int i = 0; i < k; i++) {
            d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                }
            }
        }
        System.out.println(cnt);

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(str[0]); n Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int k = Integer.parseInt(str[1]); k Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 boolean[] treated = new boolean[n]; treated new boolean[n] n Arrays.fill(treated, false) Arrays.fill Arrays treated false int cnt = n; cnt n int d = 0; d 0 for (int i = 0; i < k; i++) {
            d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                }
            }
        } int i = 0; int i = 0; i 0 i < k i k i++ i++ i {
            d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                }
            }
        } {
            d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                }
            }
        } d = Integer.parseInt(br.readLine()) d Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br str = br.readLine().split(" ") str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for (int j = 0; j < d; j++) {
                if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                }
            } int j = 0; int j = 0; j 0 j < d j d j++ j++ j {
                if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                }
            } {
                if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                }
            } if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                } treated[Integer.parseInt(str[j]) - 1] == false treated[Integer.parseInt(str[j]) - 1] treated Integer.parseInt(str[j]) - 1 Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j 1 false {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                } treated[Integer.parseInt(str[j]) - 1] = true treated[Integer.parseInt(str[j]) - 1] treated Integer.parseInt(str[j]) - 1 Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j 1 true cnt-- cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int k = Integer.parseInt(str[1]);
        boolean[] treated = new boolean[n];
        Arrays.fill(treated, false);
        int cnt = n;
        int d = 0;
        for (int i = 0; i < k; i++) {
            d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                }
            }
        }
        System.out.println(cnt);

    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int k = Integer.parseInt(str[1]);
        boolean[] treated = new boolean[n];
        Arrays.fill(treated, false);
        int cnt = n;
        int d = 0;
        for (int i = 0; i < k; i++) {
            d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                }
            }
        }
        System.out.println(cnt);

    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int k = Integer.parseInt(str[1]);
        boolean[] treated = new boolean[n];
        Arrays.fill(treated, false);
        int cnt = n;
        int d = 0;
        for (int i = 0; i < k; i++) {
            d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                if (treated[Integer.parseInt(str[j]) - 1] == false) {
                    treated[Integer.parseInt(str[j]) - 1] = true;
                    cnt--;
                }
            }
        }
        System.out.println(cnt);

    }
}
