
import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        int N = scan.nextInt();
        int K = scan.nextInt();
        HashSet<Integer> set = new HashSet<>();
        for(int i = 0; i < N; i++)
            set.add(i);

        for(int i = 0; i < K; i++) {
            int d = scan.nextInt();
            for(int j = 0; j < d; j++) {
                int A = scan.nextInt()-1;
                set.remove(A);
            }
        }

        os.println(set.size());
    }

} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        int N = scan.nextInt();
        int K = scan.nextInt();
        HashSet<Integer> set = new HashSet<>();
        for(int i = 0; i < N; i++)
            set.add(i);

        for(int i = 0; i < K; i++) {
            int d = scan.nextInt();
            for(int j = 0; j < d; j++) {
                int A = scan.nextInt()-1;
                set.remove(A);
            }
        }

        os.println(set.size());
    }

} Main public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    } main {
        solve(System.in, System.out);
    } solve(System.in, System.out) solve System.in System System.in System.out System System.out String[] args args static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        int N = scan.nextInt();
        int K = scan.nextInt();
        HashSet<Integer> set = new HashSet<>();
        for(int i = 0; i < N; i++)
            set.add(i);

        for(int i = 0; i < K; i++) {
            int d = scan.nextInt();
            for(int j = 0; j < d; j++) {
                int A = scan.nextInt()-1;
                set.remove(A);
            }
        }

        os.println(set.size());
    } solve {
        // Your code here!
        Scanner scan = new Scanner(is);
        int N = scan.nextInt();
        int K = scan.nextInt();
        HashSet<Integer> set = new HashSet<>();
        for(int i = 0; i < N; i++)
            set.add(i);

        for(int i = 0; i < K; i++) {
            int d = scan.nextInt();
            for(int j = 0; j < d; j++) {
                int A = scan.nextInt()-1;
                set.remove(A);
            }
        }

        os.println(set.size());
    } Scanner scan = new Scanner(is); scan new Scanner(is) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int K = scan.nextInt(); K scan.nextInt() scan.nextInt scan HashSet<Integer> set = new HashSet<>(); set new HashSet<>() for(int i = 0; i < N; i++)
            set.add(i); int i = 0; int i = 0; i 0 i < N i N i++ i++ i set.add(i); set.add(i) set.add set i for(int i = 0; i < K; i++) {
            int d = scan.nextInt();
            for(int j = 0; j < d; j++) {
                int A = scan.nextInt()-1;
                set.remove(A);
            }
        } int i = 0; int i = 0; i 0 i < K i K i++ i++ i {
            int d = scan.nextInt();
            for(int j = 0; j < d; j++) {
                int A = scan.nextInt()-1;
                set.remove(A);
            }
        } {
            int d = scan.nextInt();
            for(int j = 0; j < d; j++) {
                int A = scan.nextInt()-1;
                set.remove(A);
            }
        } int d = scan.nextInt(); d scan.nextInt() scan.nextInt scan for(int j = 0; j < d; j++) {
                int A = scan.nextInt()-1;
                set.remove(A);
            } int j = 0; int j = 0; j 0 j < d j d j++ j++ j {
                int A = scan.nextInt()-1;
                set.remove(A);
            } {
                int A = scan.nextInt()-1;
                set.remove(A);
            } int A = scan.nextInt()-1; A scan.nextInt()-1 scan.nextInt() scan.nextInt scan 1 set.remove(A) set.remove set A os.println(set.size()) os.println os set.size() set.size set InputStream is is PrintStream os os public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        int N = scan.nextInt();
        int K = scan.nextInt();
        HashSet<Integer> set = new HashSet<>();
        for(int i = 0; i < N; i++)
            set.add(i);

        for(int i = 0; i < K; i++) {
            int d = scan.nextInt();
            for(int j = 0; j < d; j++) {
                int A = scan.nextInt()-1;
                set.remove(A);
            }
        }

        os.println(set.size());
    }

} public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        int N = scan.nextInt();
        int K = scan.nextInt();
        HashSet<Integer> set = new HashSet<>();
        for(int i = 0; i < N; i++)
            set.add(i);

        for(int i = 0; i < K; i++) {
            int d = scan.nextInt();
            for(int j = 0; j < d; j++) {
                int A = scan.nextInt()-1;
                set.remove(A);
            }
        }

        os.println(set.size());
    }

} Main

import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        int N = scan.nextInt();
        int K = scan.nextInt();
        HashSet<Integer> set = new HashSet<>();
        for(int i = 0; i < N; i++)
            set.add(i);

        for(int i = 0; i < K; i++) {
            int d = scan.nextInt();
            for(int j = 0; j < d; j++) {
                int A = scan.nextInt()-1;
                set.remove(A);
            }
        }

        os.println(set.size());
    }

}