import java.io.*;
import static java.lang.System.out;

public class Main {
    static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws IOException {
        String[] s = in.readLine().split(" ");
        int N = Integer.parseInt(s[0]);
        int K = Integer.parseInt(s[1]);
        int ans = N;
        boolean[] b = new boolean[N];

        for (int i = 0; i < K; i++) {
            int d = Integer.parseInt(in.readLine());
            s = in.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                int a = Integer.parseInt(s[j]) - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        
        out.println(ans);
    }
} import java.io.*; io.* java import static java.lang.System.out; import static java.lang.System.out; import static java.lang.System.out; public class Main {
    static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws IOException {
        String[] s = in.readLine().split(" ");
        int N = Integer.parseInt(s[0]);
        int K = Integer.parseInt(s[1]);
        int ans = N;
        boolean[] b = new boolean[N];

        for (int i = 0; i < K; i++) {
            int d = Integer.parseInt(in.readLine());
            s = in.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                int a = Integer.parseInt(s[j]) - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        
        out.println(ans);
    }
} Main static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) public static void main(String[] args) throws IOException {
        String[] s = in.readLine().split(" ");
        int N = Integer.parseInt(s[0]);
        int K = Integer.parseInt(s[1]);
        int ans = N;
        boolean[] b = new boolean[N];

        for (int i = 0; i < K; i++) {
            int d = Integer.parseInt(in.readLine());
            s = in.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                int a = Integer.parseInt(s[j]) - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        
        out.println(ans);
    } main {
        String[] s = in.readLine().split(" ");
        int N = Integer.parseInt(s[0]);
        int K = Integer.parseInt(s[1]);
        int ans = N;
        boolean[] b = new boolean[N];

        for (int i = 0; i < K; i++) {
            int d = Integer.parseInt(in.readLine());
            s = in.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                int a = Integer.parseInt(s[j]) - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        
        out.println(ans);
    } String[] s = in.readLine().split(" "); s in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int N = Integer.parseInt(s[0]); N Integer.parseInt(s[0]) Integer.parseInt Integer s[0] s 0 int K = Integer.parseInt(s[1]); K Integer.parseInt(s[1]) Integer.parseInt Integer s[1] s 1 int ans = N; ans N boolean[] b = new boolean[N]; b new boolean[N] N for (int i = 0; i < K; i++) {
            int d = Integer.parseInt(in.readLine());
            s = in.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                int a = Integer.parseInt(s[j]) - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        } int i = 0; int i = 0; i 0 i < K i K i++ i++ i {
            int d = Integer.parseInt(in.readLine());
            s = in.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                int a = Integer.parseInt(s[j]) - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        } {
            int d = Integer.parseInt(in.readLine());
            s = in.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                int a = Integer.parseInt(s[j]) - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        } int d = Integer.parseInt(in.readLine()); d Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in s = in.readLine().split(" ") s in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " for (int j = 0; j < d; j++) {
                int a = Integer.parseInt(s[j]) - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            } int j = 0; int j = 0; j 0 j < d j d j++ j++ j {
                int a = Integer.parseInt(s[j]) - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            } {
                int a = Integer.parseInt(s[j]) - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            } int a = Integer.parseInt(s[j]) - 1; a Integer.parseInt(s[j]) - 1 Integer.parseInt(s[j]) Integer.parseInt Integer s[j] s j 1 if (!b[a]) {
                    b[a] = true;
                    ans--;
                } !b[a] b[a] b a {
                    b[a] = true;
                    ans--;
                } b[a] = true b[a] b a true ans-- ans out.println(ans) out.println out ans String[] args args public class Main {
    static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws IOException {
        String[] s = in.readLine().split(" ");
        int N = Integer.parseInt(s[0]);
        int K = Integer.parseInt(s[1]);
        int ans = N;
        boolean[] b = new boolean[N];

        for (int i = 0; i < K; i++) {
            int d = Integer.parseInt(in.readLine());
            s = in.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                int a = Integer.parseInt(s[j]) - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        
        out.println(ans);
    }
} public class Main {
    static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws IOException {
        String[] s = in.readLine().split(" ");
        int N = Integer.parseInt(s[0]);
        int K = Integer.parseInt(s[1]);
        int ans = N;
        boolean[] b = new boolean[N];

        for (int i = 0; i < K; i++) {
            int d = Integer.parseInt(in.readLine());
            s = in.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                int a = Integer.parseInt(s[j]) - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        
        out.println(ans);
    }
} Main
import java.io.*;
import static java.lang.System.out;

public class Main {
    static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws IOException {
        String[] s = in.readLine().split(" ");
        int N = Integer.parseInt(s[0]);
        int K = Integer.parseInt(s[1]);
        int ans = N;
        boolean[] b = new boolean[N];

        for (int i = 0; i < K; i++) {
            int d = Integer.parseInt(in.readLine());
            s = in.readLine().split(" ");
            for (int j = 0; j < d; j++) {
                int a = Integer.parseInt(s[j]) - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        
        out.println(ans);
    }
}
