
import java.util.Scanner;

public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        int[] visited = new int[n + 1];
        for (int i = 0; i < k; ++i) {
            int d = scanner.nextInt();
            for (int j = 0; j < d; ++j) {
                int people = scanner.nextInt();
                visited[people] = 1;
            }
        }
        int number = n;
        for (int i = 1; i <= n; ++i) {
            if (visited[i] == 1) {
                number--;
            }
        }
        System.out.println(number);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        int[] visited = new int[n + 1];
        for (int i = 0; i < k; ++i) {
            int d = scanner.nextInt();
            for (int j = 0; j < d; ++j) {
                int people = scanner.nextInt();
                visited[people] = 1;
            }
        }
        int number = n;
        for (int i = 1; i <= n; ++i) {
            if (visited[i] == 1) {
                number--;
            }
        }
        System.out.println(number);
    }
} Main public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        int[] visited = new int[n + 1];
        for (int i = 0; i < k; ++i) {
            int d = scanner.nextInt();
            for (int j = 0; j < d; ++j) {
                int people = scanner.nextInt();
                visited[people] = 1;
            }
        }
        int number = n;
        for (int i = 1; i <= n; ++i) {
            if (visited[i] == 1) {
                number--;
            }
        }
        System.out.println(number);
    } main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        int[] visited = new int[n + 1];
        for (int i = 0; i < k; ++i) {
            int d = scanner.nextInt();
            for (int j = 0; j < d; ++j) {
                int people = scanner.nextInt();
                visited[people] = 1;
            }
        }
        int number = n;
        for (int i = 1; i <= n; ++i) {
            if (visited[i] == 1) {
                number--;
            }
        }
        System.out.println(number);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int k = scanner.nextInt(); k scanner.nextInt() scanner.nextInt scanner int[] visited = new int[n + 1]; visited new int[n + 1] n + 1 n 1 for (int i = 0; i < k; ++i) {
            int d = scanner.nextInt();
            for (int j = 0; j < d; ++j) {
                int people = scanner.nextInt();
                visited[people] = 1;
            }
        } int i = 0; int i = 0; i 0 i < k i k ++i ++i i {
            int d = scanner.nextInt();
            for (int j = 0; j < d; ++j) {
                int people = scanner.nextInt();
                visited[people] = 1;
            }
        } {
            int d = scanner.nextInt();
            for (int j = 0; j < d; ++j) {
                int people = scanner.nextInt();
                visited[people] = 1;
            }
        } int d = scanner.nextInt(); d scanner.nextInt() scanner.nextInt scanner for (int j = 0; j < d; ++j) {
                int people = scanner.nextInt();
                visited[people] = 1;
            } int j = 0; int j = 0; j 0 j < d j d ++j ++j j {
                int people = scanner.nextInt();
                visited[people] = 1;
            } {
                int people = scanner.nextInt();
                visited[people] = 1;
            } int people = scanner.nextInt(); people scanner.nextInt() scanner.nextInt scanner visited[people] = 1 visited[people] visited people 1 int number = n; number n for (int i = 1; i <= n; ++i) {
            if (visited[i] == 1) {
                number--;
            }
        } int i = 1; int i = 1; i 1 i <= n i n ++i ++i i {
            if (visited[i] == 1) {
                number--;
            }
        } {
            if (visited[i] == 1) {
                number--;
            }
        } if (visited[i] == 1) {
                number--;
            } visited[i] == 1 visited[i] visited i 1 {
                number--;
            } number-- number System.out.println(number) System.out.println System.out System System.out number String [] args args public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        int[] visited = new int[n + 1];
        for (int i = 0; i < k; ++i) {
            int d = scanner.nextInt();
            for (int j = 0; j < d; ++j) {
                int people = scanner.nextInt();
                visited[people] = 1;
            }
        }
        int number = n;
        for (int i = 1; i <= n; ++i) {
            if (visited[i] == 1) {
                number--;
            }
        }
        System.out.println(number);
    }
} public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        int[] visited = new int[n + 1];
        for (int i = 0; i < k; ++i) {
            int d = scanner.nextInt();
            for (int j = 0; j < d; ++j) {
                int people = scanner.nextInt();
                visited[people] = 1;
            }
        }
        int number = n;
        for (int i = 1; i <= n; ++i) {
            if (visited[i] == 1) {
                number--;
            }
        }
        System.out.println(number);
    }
} Main

import java.util.Scanner;

public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        int[] visited = new int[n + 1];
        for (int i = 0; i < k; ++i) {
            int d = scanner.nextInt();
            for (int j = 0; j < d; ++j) {
                int people = scanner.nextInt();
                visited[people] = 1;
            }
        }
        int number = n;
        for (int i = 1; i <= n; ++i) {
            if (visited[i] == 1) {
                number--;
            }
        }
        System.out.println(number);
    }
}
