import java.util.Arrays;
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        final Scanner sc=new Scanner(System.in);

        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int[] sunuke = new int[N];
        int d, tmp;
        int cnt = N;

        Arrays.fill(sunuke, 0);

        for (int i = 0; i < K; i++) {
            d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                tmp = Integer.parseInt(sc.next()) - 1;
                if (sunuke[tmp] == 0) {
                    cnt--;
                }
                sunuke[tmp]++;
            }
        }

        System.out.print(cnt);
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        final Scanner sc=new Scanner(System.in);

        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int[] sunuke = new int[N];
        int d, tmp;
        int cnt = N;

        Arrays.fill(sunuke, 0);

        for (int i = 0; i < K; i++) {
            d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                tmp = Integer.parseInt(sc.next()) - 1;
                if (sunuke[tmp] == 0) {
                    cnt--;
                }
                sunuke[tmp]++;
            }
        }

        System.out.print(cnt);
    }
} Main public static void main(String[] args){
        final Scanner sc=new Scanner(System.in);

        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int[] sunuke = new int[N];
        int d, tmp;
        int cnt = N;

        Arrays.fill(sunuke, 0);

        for (int i = 0; i < K; i++) {
            d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                tmp = Integer.parseInt(sc.next()) - 1;
                if (sunuke[tmp] == 0) {
                    cnt--;
                }
                sunuke[tmp]++;
            }
        }

        System.out.print(cnt);
    } main {
        final Scanner sc=new Scanner(System.in);

        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int[] sunuke = new int[N];
        int d, tmp;
        int cnt = N;

        Arrays.fill(sunuke, 0);

        for (int i = 0; i < K; i++) {
            d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                tmp = Integer.parseInt(sc.next()) - 1;
                if (sunuke[tmp] == 0) {
                    cnt--;
                }
                sunuke[tmp]++;
            }
        }

        System.out.print(cnt);
    } final Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int K = Integer.parseInt(sc.next()); K Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] sunuke = new int[N]; sunuke new int[N] N int d d tmp; tmp int cnt = N; cnt N Arrays.fill(sunuke, 0) Arrays.fill Arrays sunuke 0 for (int i = 0; i < K; i++) {
            d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                tmp = Integer.parseInt(sc.next()) - 1;
                if (sunuke[tmp] == 0) {
                    cnt--;
                }
                sunuke[tmp]++;
            }
        } int i = 0; int i = 0; i 0 i < K i K i++ i++ i {
            d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                tmp = Integer.parseInt(sc.next()) - 1;
                if (sunuke[tmp] == 0) {
                    cnt--;
                }
                sunuke[tmp]++;
            }
        } {
            d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                tmp = Integer.parseInt(sc.next()) - 1;
                if (sunuke[tmp] == 0) {
                    cnt--;
                }
                sunuke[tmp]++;
            }
        } d = Integer.parseInt(sc.next()) d Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int j = 0; j < d; j++) {
                tmp = Integer.parseInt(sc.next()) - 1;
                if (sunuke[tmp] == 0) {
                    cnt--;
                }
                sunuke[tmp]++;
            } int j = 0; int j = 0; j 0 j < d j d j++ j++ j {
                tmp = Integer.parseInt(sc.next()) - 1;
                if (sunuke[tmp] == 0) {
                    cnt--;
                }
                sunuke[tmp]++;
            } {
                tmp = Integer.parseInt(sc.next()) - 1;
                if (sunuke[tmp] == 0) {
                    cnt--;
                }
                sunuke[tmp]++;
            } tmp = Integer.parseInt(sc.next()) - 1 tmp Integer.parseInt(sc.next()) - 1 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc 1 if (sunuke[tmp] == 0) {
                    cnt--;
                } sunuke[tmp] == 0 sunuke[tmp] sunuke tmp 0 {
                    cnt--;
                } cnt-- cnt sunuke[tmp]++ sunuke[tmp] sunuke tmp System.out.print(cnt) System.out.print System.out System System.out cnt String[] args args public class Main{
    public static void main(String[] args){
        final Scanner sc=new Scanner(System.in);

        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int[] sunuke = new int[N];
        int d, tmp;
        int cnt = N;

        Arrays.fill(sunuke, 0);

        for (int i = 0; i < K; i++) {
            d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                tmp = Integer.parseInt(sc.next()) - 1;
                if (sunuke[tmp] == 0) {
                    cnt--;
                }
                sunuke[tmp]++;
            }
        }

        System.out.print(cnt);
    }
} public class Main{
    public static void main(String[] args){
        final Scanner sc=new Scanner(System.in);

        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int[] sunuke = new int[N];
        int d, tmp;
        int cnt = N;

        Arrays.fill(sunuke, 0);

        for (int i = 0; i < K; i++) {
            d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                tmp = Integer.parseInt(sc.next()) - 1;
                if (sunuke[tmp] == 0) {
                    cnt--;
                }
                sunuke[tmp]++;
            }
        }

        System.out.print(cnt);
    }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        final Scanner sc=new Scanner(System.in);

        int N = Integer.parseInt(sc.next());
        int K = Integer.parseInt(sc.next());
        int[] sunuke = new int[N];
        int d, tmp;
        int cnt = N;

        Arrays.fill(sunuke, 0);

        for (int i = 0; i < K; i++) {
            d = Integer.parseInt(sc.next());
            for (int j = 0; j < d; j++) {
                tmp = Integer.parseInt(sc.next()) - 1;
                if (sunuke[tmp] == 0) {
                    cnt--;
                }
                sunuke[tmp]++;
            }
        }

        System.out.print(cnt);
    }
}