import java.util.HashSet;
import java.util.Scanner;

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

        int n = scan.nextInt();
        int k = scan.nextInt();
        HashSet<Integer> hash = new HashSet<>();

        for (int x = 0; x < k; x++) {
            int inner = scan.nextInt();
            for (int y = 0; y < inner; y++) {
                hash.add(scan.nextInt());
            }
        }

        System.out.println(n - hash.size());
   }
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        int k = scan.nextInt();
        HashSet<Integer> hash = new HashSet<>();

        for (int x = 0; x < k; x++) {
            int inner = scan.nextInt();
            for (int y = 0; y < inner; y++) {
                hash.add(scan.nextInt());
            }
        }

        System.out.println(n - hash.size());
   }
} Main public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        int k = scan.nextInt();
        HashSet<Integer> hash = new HashSet<>();

        for (int x = 0; x < k; x++) {
            int inner = scan.nextInt();
            for (int y = 0; y < inner; y++) {
                hash.add(scan.nextInt());
            }
        }

        System.out.println(n - hash.size());
   } main {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        int k = scan.nextInt();
        HashSet<Integer> hash = new HashSet<>();

        for (int x = 0; x < k; x++) {
            int inner = scan.nextInt();
            for (int y = 0; y < inner; y++) {
                hash.add(scan.nextInt());
            }
        }

        System.out.println(n - hash.size());
   } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int k = scan.nextInt(); k scan.nextInt() scan.nextInt scan HashSet<Integer> hash = new HashSet<>(); hash new HashSet<>() for (int x = 0; x < k; x++) {
            int inner = scan.nextInt();
            for (int y = 0; y < inner; y++) {
                hash.add(scan.nextInt());
            }
        } int x = 0; int x = 0; x 0 x < k x k x++ x++ x {
            int inner = scan.nextInt();
            for (int y = 0; y < inner; y++) {
                hash.add(scan.nextInt());
            }
        } {
            int inner = scan.nextInt();
            for (int y = 0; y < inner; y++) {
                hash.add(scan.nextInt());
            }
        } int inner = scan.nextInt(); inner scan.nextInt() scan.nextInt scan for (int y = 0; y < inner; y++) {
                hash.add(scan.nextInt());
            } int y = 0; int y = 0; y 0 y < inner y inner y++ y++ y {
                hash.add(scan.nextInt());
            } {
                hash.add(scan.nextInt());
            } hash.add(scan.nextInt()) hash.add hash scan.nextInt() scan.nextInt scan System.out.println(n - hash.size()) System.out.println System.out System System.out n - hash.size() n hash.size() hash.size hash String args[] args public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        int k = scan.nextInt();
        HashSet<Integer> hash = new HashSet<>();

        for (int x = 0; x < k; x++) {
            int inner = scan.nextInt();
            for (int y = 0; y < inner; y++) {
                hash.add(scan.nextInt());
            }
        }

        System.out.println(n - hash.size());
   }
} public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        int k = scan.nextInt();
        HashSet<Integer> hash = new HashSet<>();

        for (int x = 0; x < k; x++) {
            int inner = scan.nextInt();
            for (int y = 0; y < inner; y++) {
                hash.add(scan.nextInt());
            }
        }

        System.out.println(n - hash.size());
   }
} Main
import java.util.HashSet;
import java.util.Scanner;

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

        int n = scan.nextInt();
        int k = scan.nextInt();
        HashSet<Integer> hash = new HashSet<>();

        for (int x = 0; x < k; x++) {
            int inner = scan.nextInt();
            for (int y = 0; y < inner; y++) {
                hash.add(scan.nextInt());
            }
        }

        System.out.println(n - hash.size());
   }
}