import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.List;

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

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));
            int N = Integer.parseInt(firstRow.get(0));
            int K = Integer.parseInt(firstRow.get(1));

            Set<String> haveCookie = new HashSet<>();
            for (int i = 0; i < K; i++) {
                br.readLine();
                List<String> tmpList = Arrays.asList(br.readLine().split(" "));
                for (String tmp : tmpList) {
                    haveCookie.add(tmp);
                }
            }

            int ans = N - haveCookie.size();
            System.out.println(ans);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
} 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 import java.util.HashSet; HashSet java.util import java.util.Set; Set java.util import java.util.List; List java.util class Main {
    public static void main(final String[] args) throws Exception {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));
            int N = Integer.parseInt(firstRow.get(0));
            int K = Integer.parseInt(firstRow.get(1));

            Set<String> haveCookie = new HashSet<>();
            for (int i = 0; i < K; i++) {
                br.readLine();
                List<String> tmpList = Arrays.asList(br.readLine().split(" "));
                for (String tmp : tmpList) {
                    haveCookie.add(tmp);
                }
            }

            int ans = N - haveCookie.size();
            System.out.println(ans);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
} Main public static void main(final String[] args) throws Exception {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));
            int N = Integer.parseInt(firstRow.get(0));
            int K = Integer.parseInt(firstRow.get(1));

            Set<String> haveCookie = new HashSet<>();
            for (int i = 0; i < K; i++) {
                br.readLine();
                List<String> tmpList = Arrays.asList(br.readLine().split(" "));
                for (String tmp : tmpList) {
                    haveCookie.add(tmp);
                }
            }

            int ans = N - haveCookie.size();
            System.out.println(ans);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    } main {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));
            int N = Integer.parseInt(firstRow.get(0));
            int K = Integer.parseInt(firstRow.get(1));

            Set<String> haveCookie = new HashSet<>();
            for (int i = 0; i < K; i++) {
                br.readLine();
                List<String> tmpList = Arrays.asList(br.readLine().split(" "));
                for (String tmp : tmpList) {
                    haveCookie.add(tmp);
                }
            }

            int ans = N - haveCookie.size();
            System.out.println(ans);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    } try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));
            int N = Integer.parseInt(firstRow.get(0));
            int K = Integer.parseInt(firstRow.get(1));

            Set<String> haveCookie = new HashSet<>();
            for (int i = 0; i < K; i++) {
                br.readLine();
                List<String> tmpList = Arrays.asList(br.readLine().split(" "));
                for (String tmp : tmpList) {
                    haveCookie.add(tmp);
                }
            }

            int ans = N - haveCookie.size();
            System.out.println(ans);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } IOException | NumberFormatException e {
            e.printStackTrace();
            System.exit(0);
        } e.printStackTrace() e.printStackTrace e System.exit(0) System.exit System 0 catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        } final Exception e {
            e.printStackTrace();
            System.exit(0);
        } e.printStackTrace() e.printStackTrace e System.exit(0) System.exit System 0 {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));
            int N = Integer.parseInt(firstRow.get(0));
            int K = Integer.parseInt(firstRow.get(1));

            Set<String> haveCookie = new HashSet<>();
            for (int i = 0; i < K; i++) {
                br.readLine();
                List<String> tmpList = Arrays.asList(br.readLine().split(" "));
                for (String tmp : tmpList) {
                    haveCookie.add(tmp);
                }
            }

            int ans = N - haveCookie.size();
            System.out.println(ans);
        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) List<String> firstRow = Arrays.asList(br.readLine().split(" ")); firstRow Arrays.asList(br.readLine().split(" ")) Arrays.asList Arrays br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int N = Integer.parseInt(firstRow.get(0)); N Integer.parseInt(firstRow.get(0)) Integer.parseInt Integer firstRow.get(0) firstRow.get firstRow 0 int K = Integer.parseInt(firstRow.get(1)); K Integer.parseInt(firstRow.get(1)) Integer.parseInt Integer firstRow.get(1) firstRow.get firstRow 1 Set<String> haveCookie = new HashSet<>(); haveCookie new HashSet<>() for (int i = 0; i < K; i++) {
                br.readLine();
                List<String> tmpList = Arrays.asList(br.readLine().split(" "));
                for (String tmp : tmpList) {
                    haveCookie.add(tmp);
                }
            } int i = 0; int i = 0; i 0 i < K i K i++ i++ i {
                br.readLine();
                List<String> tmpList = Arrays.asList(br.readLine().split(" "));
                for (String tmp : tmpList) {
                    haveCookie.add(tmp);
                }
            } {
                br.readLine();
                List<String> tmpList = Arrays.asList(br.readLine().split(" "));
                for (String tmp : tmpList) {
                    haveCookie.add(tmp);
                }
            } br.readLine() br.readLine br List<String> tmpList = Arrays.asList(br.readLine().split(" ")); tmpList Arrays.asList(br.readLine().split(" ")) Arrays.asList Arrays br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for (String tmp : tmpList) {
                    haveCookie.add(tmp);
                } String tmp tmpList {
                    haveCookie.add(tmp);
                } {
                    haveCookie.add(tmp);
                } haveCookie.add(tmp) haveCookie.add haveCookie tmp int ans = N - haveCookie.size(); ans N - haveCookie.size() N haveCookie.size() haveCookie.size haveCookie System.out.println(ans) System.out.println System.out System System.out ans final String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.List;

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

        try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
            List<String> firstRow = Arrays.asList(br.readLine().split(" "));
            int N = Integer.parseInt(firstRow.get(0));
            int K = Integer.parseInt(firstRow.get(1));

            Set<String> haveCookie = new HashSet<>();
            for (int i = 0; i < K; i++) {
                br.readLine();
                List<String> tmpList = Arrays.asList(br.readLine().split(" "));
                for (String tmp : tmpList) {
                    haveCookie.add(tmp);
                }
            }

            int ans = N - haveCookie.size();
            System.out.println(ans);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
}