import java.io.File;
import java.io.FileNotFoundException;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int K = s.nextInt();

        Set set = new HashSet();
        for (int i = 1; i <= N; i++) {
            set.add(i);
        }

        for (int i = 0; i < K; i++) {
            if(set.size()<=0){break;}
            int di = s.nextInt();
            for (int j = 0; j < di; j++) {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            }
        }
        System.out.println(set.size());

    }
} import java.io.File; File java.io import java.io.FileNotFoundException; FileNotFoundException java.io import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int K = s.nextInt();

        Set set = new HashSet();
        for (int i = 1; i <= N; i++) {
            set.add(i);
        }

        for (int i = 0; i < K; i++) {
            if(set.size()<=0){break;}
            int di = s.nextInt();
            for (int j = 0; j < di; j++) {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            }
        }
        System.out.println(set.size());

    }
} Main public static void main(String[] args) throws FileNotFoundException {
        Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int K = s.nextInt();

        Set set = new HashSet();
        for (int i = 1; i <= N; i++) {
            set.add(i);
        }

        for (int i = 0; i < K; i++) {
            if(set.size()<=0){break;}
            int di = s.nextInt();
            for (int j = 0; j < di; j++) {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            }
        }
        System.out.println(set.size());

    } main {
        Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int K = s.nextInt();

        Set set = new HashSet();
        for (int i = 1; i <= N; i++) {
            set.add(i);
        }

        for (int i = 0; i < K; i++) {
            if(set.size()<=0){break;}
            int di = s.nextInt();
            for (int j = 0; j < di; j++) {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            }
        }
        System.out.println(set.size());

    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int N = s.nextInt(); N s.nextInt() s.nextInt s int K = s.nextInt(); K s.nextInt() s.nextInt s Set set = new HashSet(); set new HashSet() for (int i = 1; i <= N; i++) {
            set.add(i);
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            set.add(i);
        } {
            set.add(i);
        } set.add(i) set.add set i for (int i = 0; i < K; i++) {
            if(set.size()<=0){break;}
            int di = s.nextInt();
            for (int j = 0; j < di; j++) {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            }
        } int i = 0; int i = 0; i 0 i < K i K i++ i++ i {
            if(set.size()<=0){break;}
            int di = s.nextInt();
            for (int j = 0; j < di; j++) {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            }
        } {
            if(set.size()<=0){break;}
            int di = s.nextInt();
            for (int j = 0; j < di; j++) {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            }
        } if(set.size()<=0){break;} set.size()<=0 set.size() set.size set 0 {break;} break; int di = s.nextInt(); di s.nextInt() s.nextInt s for (int j = 0; j < di; j++) {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            } int j = 0; int j = 0; j 0 j < di j di j++ j++ j {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            } {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            } int num = s.nextInt(); num s.nextInt() s.nextInt s if(set.contains(num)) {
                    set.remove(num);
                } set.contains(num) set.contains set num {
                    set.remove(num);
                } set.remove(num) set.remove set num System.out.println(set.size()) System.out.println System.out System System.out set.size() set.size set String[] args args public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int K = s.nextInt();

        Set set = new HashSet();
        for (int i = 1; i <= N; i++) {
            set.add(i);
        }

        for (int i = 0; i < K; i++) {
            if(set.size()<=0){break;}
            int di = s.nextInt();
            for (int j = 0; j < di; j++) {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            }
        }
        System.out.println(set.size());

    }
} public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int K = s.nextInt();

        Set set = new HashSet();
        for (int i = 1; i <= N; i++) {
            set.add(i);
        }

        for (int i = 0; i < K; i++) {
            if(set.size()<=0){break;}
            int di = s.nextInt();
            for (int j = 0; j < di; j++) {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            }
        }
        System.out.println(set.size());

    }
} Main
import java.io.File;
import java.io.FileNotFoundException;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int K = s.nextInt();

        Set set = new HashSet();
        for (int i = 1; i <= N; i++) {
            set.add(i);
        }

        for (int i = 0; i < K; i++) {
            if(set.size()<=0){break;}
            int di = s.nextInt();
            for (int j = 0; j < di; j++) {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            }
        }
        System.out.println(set.size());

    }
}
