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

/**
 * Created with IntelliJ IDEA.
 * User: ngupta
 * Date: 4/5/2020 AD
 * Time: 23:41
 */
class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String[] NK = sc.nextLine().trim().split(" ");
        int N = Integer.parseInt(NK[0]);
        int K = Integer.parseInt(NK[1]);
        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < K; i++) {
            sc.nextLine();
            String[] snukes = sc.nextLine().trim().split(" ");
            for (String sn : snukes)
                set.add(Integer.parseInt(sn));
        }

        System.out.println(N - set.size());
    }
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String[] NK = sc.nextLine().trim().split(" ");
        int N = Integer.parseInt(NK[0]);
        int K = Integer.parseInt(NK[1]);
        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < K; i++) {
            sc.nextLine();
            String[] snukes = sc.nextLine().trim().split(" ");
            for (String sn : snukes)
                set.add(Integer.parseInt(sn));
        }

        System.out.println(N - set.size());
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String[] NK = sc.nextLine().trim().split(" ");
        int N = Integer.parseInt(NK[0]);
        int K = Integer.parseInt(NK[1]);
        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < K; i++) {
            sc.nextLine();
            String[] snukes = sc.nextLine().trim().split(" ");
            for (String sn : snukes)
                set.add(Integer.parseInt(sn));
        }

        System.out.println(N - set.size());
    } main {
        Scanner sc = new Scanner(System.in);
        String[] NK = sc.nextLine().trim().split(" ");
        int N = Integer.parseInt(NK[0]);
        int K = Integer.parseInt(NK[1]);
        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < K; i++) {
            sc.nextLine();
            String[] snukes = sc.nextLine().trim().split(" ");
            for (String sn : snukes)
                set.add(Integer.parseInt(sn));
        }

        System.out.println(N - set.size());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] NK = sc.nextLine().trim().split(" "); NK sc.nextLine().trim().split(" ") sc.nextLine().trim().split sc.nextLine().trim() sc.nextLine().trim sc.nextLine() sc.nextLine sc " " int N = Integer.parseInt(NK[0]); N Integer.parseInt(NK[0]) Integer.parseInt Integer NK[0] NK 0 int K = Integer.parseInt(NK[1]); K Integer.parseInt(NK[1]) Integer.parseInt Integer NK[1] NK 1 Set<Integer> set = new HashSet<>(); set new HashSet<>() for (int i = 0; i < K; i++) {
            sc.nextLine();
            String[] snukes = sc.nextLine().trim().split(" ");
            for (String sn : snukes)
                set.add(Integer.parseInt(sn));
        } int i = 0; int i = 0; i 0 i < K i K i++ i++ i {
            sc.nextLine();
            String[] snukes = sc.nextLine().trim().split(" ");
            for (String sn : snukes)
                set.add(Integer.parseInt(sn));
        } {
            sc.nextLine();
            String[] snukes = sc.nextLine().trim().split(" ");
            for (String sn : snukes)
                set.add(Integer.parseInt(sn));
        } sc.nextLine() sc.nextLine sc String[] snukes = sc.nextLine().trim().split(" "); snukes sc.nextLine().trim().split(" ") sc.nextLine().trim().split sc.nextLine().trim() sc.nextLine().trim sc.nextLine() sc.nextLine sc " " for (String sn : snukes)
                set.add(Integer.parseInt(sn)); String sn snukes set.add(Integer.parseInt(sn)); set.add(Integer.parseInt(sn)) set.add set Integer.parseInt(sn) Integer.parseInt Integer sn System.out.println(N - set.size()) System.out.println System.out System System.out N - set.size() N set.size() set.size set String[] args args
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * User: ngupta
 * Date: 4/5/2020 AD
 * Time: 23:41
 */
class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String[] NK = sc.nextLine().trim().split(" ");
        int N = Integer.parseInt(NK[0]);
        int K = Integer.parseInt(NK[1]);
        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < K; i++) {
            sc.nextLine();
            String[] snukes = sc.nextLine().trim().split(" ");
            for (String sn : snukes)
                set.add(Integer.parseInt(sn));
        }

        System.out.println(N - set.size());
    }
}
