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

public class Main {
    static MyReader in = new MyReader();

    static long[][] nCr = new long[51][51];

    public static void main(String[] args) {
        int N = in.i();
        int K = in.i();
        int ans = N;
        boolean[] b = new boolean[N];
        for (int i = 0; i < K; i++) {
            int d = in.i();
            for (int j = 0; j < d; j++) {
                int a = in.i() - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        out.println(ans);
    }

    static long pow(long a, int b) {
        long c = 1;
        while (b > 0) {
            if ((b & 1) == 1) {
                c *= a;
            }
            a *= a;
            b >>= 1;
        }
        return c;
    }

    static long nCr(int n, int r) {
        if (n < r) return 0;
        if (nCr[n][r] > 0) return nCr[n][r];
        if (r == 0) return nCr[n][r] = 1;
        if (n - r < r) return nCr[n][r] = nCr(n, n - r);
        else return nCr[n][r] = nCr(n - 1, r - 1) + nCr(n - 1, r);
    }
}

class MyReader extends BufferedReader {
    char[] cbuf = new char[1024];
    int head = 0;
    int tail = 0;

    MyReader() {
        super(new InputStreamReader(System.in));
    }

    char next() {
        if (head == tail) {
            try {
                tail = super.read(cbuf, 0, cbuf.length);
            } catch (IOException e) {
                e.printStackTrace();
            }
            head = 0;
        }
        return cbuf[head++];
    }

    int i() {
        int k = next() - '0';
        boolean minus = k == -3;
        int n = minus ? 0 : k;
        while (0 <= (k = next() - '0') && k <= 9) n = 10 * n + k;
        return minus ? -n : n;
    }

    int[] ii(final int N) {
        int[] a = new int[N];
        for (int j = 0; j < a.length; j++) a[j] = i();
        return a;
    }

    char[] s(final int N) {
        char[] s = new char[N];
        for (int i = 0; i < N; i++) {
            s[i] = next();
        }
        next();
        return s;
    }

    public int read(char[] cbuf) {
        int i;
        for (i = 0; i < cbuf.length; i++) {
            char c = next();
            if (c == ' ' || c == '\n') {
                break;
            }
            cbuf[i] = c;
        }
        if (i == cbuf.length) next();
        return i;
    }
} import java.io.*; io.* java import java.util.*; util.* java import static java.lang.System.out; import static java.lang.System.out; import static java.lang.System.out; public class Main {
    static MyReader in = new MyReader();

    static long[][] nCr = new long[51][51];

    public static void main(String[] args) {
        int N = in.i();
        int K = in.i();
        int ans = N;
        boolean[] b = new boolean[N];
        for (int i = 0; i < K; i++) {
            int d = in.i();
            for (int j = 0; j < d; j++) {
                int a = in.i() - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        out.println(ans);
    }

    static long pow(long a, int b) {
        long c = 1;
        while (b > 0) {
            if ((b & 1) == 1) {
                c *= a;
            }
            a *= a;
            b >>= 1;
        }
        return c;
    }

    static long nCr(int n, int r) {
        if (n < r) return 0;
        if (nCr[n][r] > 0) return nCr[n][r];
        if (r == 0) return nCr[n][r] = 1;
        if (n - r < r) return nCr[n][r] = nCr(n, n - r);
        else return nCr[n][r] = nCr(n - 1, r - 1) + nCr(n - 1, r);
    }
} Main static MyReader in = new MyReader(); in new MyReader() static long[][] nCr = new long[51][51]; nCr new long[51][51] 51 51 public static void main(String[] args) {
        int N = in.i();
        int K = in.i();
        int ans = N;
        boolean[] b = new boolean[N];
        for (int i = 0; i < K; i++) {
            int d = in.i();
            for (int j = 0; j < d; j++) {
                int a = in.i() - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        out.println(ans);
    } main {
        int N = in.i();
        int K = in.i();
        int ans = N;
        boolean[] b = new boolean[N];
        for (int i = 0; i < K; i++) {
            int d = in.i();
            for (int j = 0; j < d; j++) {
                int a = in.i() - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        out.println(ans);
    } int N = in.i(); N in.i() in.i in int K = in.i(); K in.i() in.i in int ans = N; ans N boolean[] b = new boolean[N]; b new boolean[N] N for (int i = 0; i < K; i++) {
            int d = in.i();
            for (int j = 0; j < d; j++) {
                int a = in.i() - 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 = in.i();
            for (int j = 0; j < d; j++) {
                int a = in.i() - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        } {
            int d = in.i();
            for (int j = 0; j < d; j++) {
                int a = in.i() - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        } int d = in.i(); d in.i() in.i in for (int j = 0; j < d; j++) {
                int a = in.i() - 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 = in.i() - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            } {
                int a = in.i() - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            } int a = in.i() - 1; a in.i() - 1 in.i() in.i in 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 static long pow(long a, int b) {
        long c = 1;
        while (b > 0) {
            if ((b & 1) == 1) {
                c *= a;
            }
            a *= a;
            b >>= 1;
        }
        return c;
    } pow {
        long c = 1;
        while (b > 0) {
            if ((b & 1) == 1) {
                c *= a;
            }
            a *= a;
            b >>= 1;
        }
        return c;
    } long c = 1; c 1 while (b > 0) {
            if ((b & 1) == 1) {
                c *= a;
            }
            a *= a;
            b >>= 1;
        } b > 0 b 0 {
            if ((b & 1) == 1) {
                c *= a;
            }
            a *= a;
            b >>= 1;
        } if ((b & 1) == 1) {
                c *= a;
            } (b & 1) == 1 (b & 1) b 1 1 {
                c *= a;
            } c *= a c a a *= a a a b >>= 1 b 1 return c; c long a a int b b static long nCr(int n, int r) {
        if (n < r) return 0;
        if (nCr[n][r] > 0) return nCr[n][r];
        if (r == 0) return nCr[n][r] = 1;
        if (n - r < r) return nCr[n][r] = nCr(n, n - r);
        else return nCr[n][r] = nCr(n - 1, r - 1) + nCr(n - 1, r);
    } nCr {
        if (n < r) return 0;
        if (nCr[n][r] > 0) return nCr[n][r];
        if (r == 0) return nCr[n][r] = 1;
        if (n - r < r) return nCr[n][r] = nCr(n, n - r);
        else return nCr[n][r] = nCr(n - 1, r - 1) + nCr(n - 1, r);
    } if (n < r) return 0; n < r n r return 0; 0 if (nCr[n][r] > 0) return nCr[n][r]; nCr[n][r] > 0 nCr[n][r] nCr[n] nCr n r 0 return nCr[n][r]; nCr[n][r] nCr[n] nCr n r if (r == 0) return nCr[n][r] = 1; r == 0 r 0 return nCr[n][r] = 1; nCr[n][r] = 1 nCr[n][r] nCr[n] nCr n r 1 if (n - r < r) return nCr[n][r] = nCr(n, n - r);
        else return nCr[n][r] = nCr(n - 1, r - 1) + nCr(n - 1, r); n - r < r n - r n r r return nCr[n][r] = nCr(n, n - r); nCr[n][r] = nCr(n, n - r) nCr[n][r] nCr[n] nCr n r nCr(n, n - r) nCr n n - r n r return nCr[n][r] = nCr(n - 1, r - 1) + nCr(n - 1, r); nCr[n][r] = nCr(n - 1, r - 1) + nCr(n - 1, r) nCr[n][r] nCr[n] nCr n r nCr(n - 1, r - 1) + nCr(n - 1, r) nCr(n - 1, r - 1) nCr n - 1 n 1 r - 1 r 1 nCr(n - 1, r) nCr n - 1 n 1 r int n n int r r class MyReader extends BufferedReader {
    char[] cbuf = new char[1024];
    int head = 0;
    int tail = 0;

    MyReader() {
        super(new InputStreamReader(System.in));
    }

    char next() {
        if (head == tail) {
            try {
                tail = super.read(cbuf, 0, cbuf.length);
            } catch (IOException e) {
                e.printStackTrace();
            }
            head = 0;
        }
        return cbuf[head++];
    }

    int i() {
        int k = next() - '0';
        boolean minus = k == -3;
        int n = minus ? 0 : k;
        while (0 <= (k = next() - '0') && k <= 9) n = 10 * n + k;
        return minus ? -n : n;
    }

    int[] ii(final int N) {
        int[] a = new int[N];
        for (int j = 0; j < a.length; j++) a[j] = i();
        return a;
    }

    char[] s(final int N) {
        char[] s = new char[N];
        for (int i = 0; i < N; i++) {
            s[i] = next();
        }
        next();
        return s;
    }

    public int read(char[] cbuf) {
        int i;
        for (i = 0; i < cbuf.length; i++) {
            char c = next();
            if (c == ' ' || c == '\n') {
                break;
            }
            cbuf[i] = c;
        }
        if (i == cbuf.length) next();
        return i;
    }
} MyReader char[] cbuf = new char[1024]; cbuf new char[1024] 1024 int head = 0; head 0 int tail = 0; tail 0 MyReader() {
        super(new InputStreamReader(System.in));
    } MyReader {
        super(new InputStreamReader(System.in));
    } super(new InputStreamReader(System.in)) super new InputStreamReader(System.in) char next() {
        if (head == tail) {
            try {
                tail = super.read(cbuf, 0, cbuf.length);
            } catch (IOException e) {
                e.printStackTrace();
            }
            head = 0;
        }
        return cbuf[head++];
    } next {
        if (head == tail) {
            try {
                tail = super.read(cbuf, 0, cbuf.length);
            } catch (IOException e) {
                e.printStackTrace();
            }
            head = 0;
        }
        return cbuf[head++];
    } if (head == tail) {
            try {
                tail = super.read(cbuf, 0, cbuf.length);
            } catch (IOException e) {
                e.printStackTrace();
            }
            head = 0;
        } head == tail head tail {
            try {
                tail = super.read(cbuf, 0, cbuf.length);
            } catch (IOException e) {
                e.printStackTrace();
            }
            head = 0;
        } try {
                tail = super.read(cbuf, 0, cbuf.length);
            } catch (IOException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                tail = super.read(cbuf, 0, cbuf.length);
            } tail = super.read(cbuf, 0, cbuf.length) tail super.read(cbuf, 0, cbuf.length) super.read super cbuf 0 cbuf.length cbuf cbuf.length head = 0 head 0 return cbuf[head++]; cbuf[head++] cbuf head++ head int i() {
        int k = next() - '0';
        boolean minus = k == -3;
        int n = minus ? 0 : k;
        while (0 <= (k = next() - '0') && k <= 9) n = 10 * n + k;
        return minus ? -n : n;
    } i {
        int k = next() - '0';
        boolean minus = k == -3;
        int n = minus ? 0 : k;
        while (0 <= (k = next() - '0') && k <= 9) n = 10 * n + k;
        return minus ? -n : n;
    } int k = next() - '0'; k next() - '0' next() next '0' boolean minus = k == -3; minus k == -3 k -3 3 int n = minus ? 0 : k; n minus ? 0 : k minus 0 k while (0 <= (k = next() - '0') && k <= 9) n = 10 * n + k; 0 <= (k = next() - '0') && k <= 9 0 <= (k = next() - '0') 0 (k = next() - '0') k next() - '0' next() next '0' k <= 9 k 9 n = 10 * n + k n 10 * n + k 10 * n 10 n k return minus ? -n : n; minus ? -n : n minus -n n n int[] ii(final int N) {
        int[] a = new int[N];
        for (int j = 0; j < a.length; j++) a[j] = i();
        return a;
    } ii {
        int[] a = new int[N];
        for (int j = 0; j < a.length; j++) a[j] = i();
        return a;
    } int[] a = new int[N]; a new int[N] N for (int j = 0; j < a.length; j++) a[j] = i(); int j = 0; int j = 0; j 0 j < a.length j a.length a a.length j++ j++ j a[j] = i(); a[j] = i() a[j] a j i() i return a; a final int N N char[] s(final int N) {
        char[] s = new char[N];
        for (int i = 0; i < N; i++) {
            s[i] = next();
        }
        next();
        return s;
    } s {
        char[] s = new char[N];
        for (int i = 0; i < N; i++) {
            s[i] = next();
        }
        next();
        return s;
    } char[] s = new char[N]; s new char[N] N for (int i = 0; i < N; i++) {
            s[i] = next();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            s[i] = next();
        } {
            s[i] = next();
        } s[i] = next() s[i] s i next() next next() next return s; s final int N N public int read(char[] cbuf) {
        int i;
        for (i = 0; i < cbuf.length; i++) {
            char c = next();
            if (c == ' ' || c == '\n') {
                break;
            }
            cbuf[i] = c;
        }
        if (i == cbuf.length) next();
        return i;
    } read {
        int i;
        for (i = 0; i < cbuf.length; i++) {
            char c = next();
            if (c == ' ' || c == '\n') {
                break;
            }
            cbuf[i] = c;
        }
        if (i == cbuf.length) next();
        return i;
    } int i; i for (i = 0; i < cbuf.length; i++) {
            char c = next();
            if (c == ' ' || c == '\n') {
                break;
            }
            cbuf[i] = c;
        } i = 0; i = 0 i 0 i < cbuf.length i cbuf.length cbuf cbuf.length i++ i++ i {
            char c = next();
            if (c == ' ' || c == '\n') {
                break;
            }
            cbuf[i] = c;
        } {
            char c = next();
            if (c == ' ' || c == '\n') {
                break;
            }
            cbuf[i] = c;
        } char c = next(); c next() next if (c == ' ' || c == '\n') {
                break;
            } c == ' ' || c == '\n' c == ' ' c ' ' c == '\n' c '\n' {
                break;
            } break; cbuf[i] = c cbuf[i] cbuf i c if (i == cbuf.length) next(); i == cbuf.length i cbuf.length cbuf cbuf.length next() next return i; i char[] cbuf cbuf BufferedReader public class Main {
    static MyReader in = new MyReader();

    static long[][] nCr = new long[51][51];

    public static void main(String[] args) {
        int N = in.i();
        int K = in.i();
        int ans = N;
        boolean[] b = new boolean[N];
        for (int i = 0; i < K; i++) {
            int d = in.i();
            for (int j = 0; j < d; j++) {
                int a = in.i() - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        out.println(ans);
    }

    static long pow(long a, int b) {
        long c = 1;
        while (b > 0) {
            if ((b & 1) == 1) {
                c *= a;
            }
            a *= a;
            b >>= 1;
        }
        return c;
    }

    static long nCr(int n, int r) {
        if (n < r) return 0;
        if (nCr[n][r] > 0) return nCr[n][r];
        if (r == 0) return nCr[n][r] = 1;
        if (n - r < r) return nCr[n][r] = nCr(n, n - r);
        else return nCr[n][r] = nCr(n - 1, r - 1) + nCr(n - 1, r);
    }
} public class Main {
    static MyReader in = new MyReader();

    static long[][] nCr = new long[51][51];

    public static void main(String[] args) {
        int N = in.i();
        int K = in.i();
        int ans = N;
        boolean[] b = new boolean[N];
        for (int i = 0; i < K; i++) {
            int d = in.i();
            for (int j = 0; j < d; j++) {
                int a = in.i() - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        out.println(ans);
    }

    static long pow(long a, int b) {
        long c = 1;
        while (b > 0) {
            if ((b & 1) == 1) {
                c *= a;
            }
            a *= a;
            b >>= 1;
        }
        return c;
    }

    static long nCr(int n, int r) {
        if (n < r) return 0;
        if (nCr[n][r] > 0) return nCr[n][r];
        if (r == 0) return nCr[n][r] = 1;
        if (n - r < r) return nCr[n][r] = nCr(n, n - r);
        else return nCr[n][r] = nCr(n - 1, r - 1) + nCr(n - 1, r);
    }
} Main
import java.io.*;
import java.util.*;
import static java.lang.System.out;

public class Main {
    static MyReader in = new MyReader();

    static long[][] nCr = new long[51][51];

    public static void main(String[] args) {
        int N = in.i();
        int K = in.i();
        int ans = N;
        boolean[] b = new boolean[N];
        for (int i = 0; i < K; i++) {
            int d = in.i();
            for (int j = 0; j < d; j++) {
                int a = in.i() - 1;
                if (!b[a]) {
                    b[a] = true;
                    ans--;
                }
            }
        }
        out.println(ans);
    }

    static long pow(long a, int b) {
        long c = 1;
        while (b > 0) {
            if ((b & 1) == 1) {
                c *= a;
            }
            a *= a;
            b >>= 1;
        }
        return c;
    }

    static long nCr(int n, int r) {
        if (n < r) return 0;
        if (nCr[n][r] > 0) return nCr[n][r];
        if (r == 0) return nCr[n][r] = 1;
        if (n - r < r) return nCr[n][r] = nCr(n, n - r);
        else return nCr[n][r] = nCr(n - 1, r - 1) + nCr(n - 1, r);
    }
}

class MyReader extends BufferedReader {
    char[] cbuf = new char[1024];
    int head = 0;
    int tail = 0;

    MyReader() {
        super(new InputStreamReader(System.in));
    }

    char next() {
        if (head == tail) {
            try {
                tail = super.read(cbuf, 0, cbuf.length);
            } catch (IOException e) {
                e.printStackTrace();
            }
            head = 0;
        }
        return cbuf[head++];
    }

    int i() {
        int k = next() - '0';
        boolean minus = k == -3;
        int n = minus ? 0 : k;
        while (0 <= (k = next() - '0') && k <= 9) n = 10 * n + k;
        return minus ? -n : n;
    }

    int[] ii(final int N) {
        int[] a = new int[N];
        for (int j = 0; j < a.length; j++) a[j] = i();
        return a;
    }

    char[] s(final int N) {
        char[] s = new char[N];
        for (int i = 0; i < N; i++) {
            s[i] = next();
        }
        next();
        return s;
    }

    public int read(char[] cbuf) {
        int i;
        for (i = 0; i < cbuf.length; i++) {
            char c = next();
            if (c == ' ' || c == '\n') {
                break;
            }
            cbuf[i] = c;
        }
        if (i == cbuf.length) next();
        return i;
    }
}
