
import java.util.Map.Entry;
import java.util.*;
 
import org.w3c.dom.css.Counter;
 
public class Main {
//public class App {
 
    public static void main(final String[] args){
     //スキャン
     final Scanner s = new Scanner(System.in);
     final int N = Integer.parseInt(s.next());
     final int K = Integer.parseInt(s.next());
     HashSet<String> hashSet = new HashSet<String>();

     for(int i=0; i< K;i++){
        int di = Integer.parseInt(s.next());
        String blank = s.nextLine();
        String huge = s.nextLine();

        String[] hage = huge.split(" ",0);
        int hageN= hage.length;
        for (int num =0;num<hageN;num++){
            if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            }
        }

     }
     s.close();

     System.out.println(N-hashSet.size());
}
} import java.util.Map.Entry; Entry java.util.Map import java.util.*; util.* java import org.w3c.dom.css.Counter; Counter org.w3c.dom.css public class Main {
//public class App {
 
    public static void main(final String[] args){
     //スキャン
     final Scanner s = new Scanner(System.in);
     final int N = Integer.parseInt(s.next());
     final int K = Integer.parseInt(s.next());
     HashSet<String> hashSet = new HashSet<String>();

     for(int i=0; i< K;i++){
        int di = Integer.parseInt(s.next());
        String blank = s.nextLine();
        String huge = s.nextLine();

        String[] hage = huge.split(" ",0);
        int hageN= hage.length;
        for (int num =0;num<hageN;num++){
            if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            }
        }

     }
     s.close();

     System.out.println(N-hashSet.size());
}
} Main public static void main(final String[] args){
     //スキャン
     final Scanner s = new Scanner(System.in);
     final int N = Integer.parseInt(s.next());
     final int K = Integer.parseInt(s.next());
     HashSet<String> hashSet = new HashSet<String>();

     for(int i=0; i< K;i++){
        int di = Integer.parseInt(s.next());
        String blank = s.nextLine();
        String huge = s.nextLine();

        String[] hage = huge.split(" ",0);
        int hageN= hage.length;
        for (int num =0;num<hageN;num++){
            if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            }
        }

     }
     s.close();

     System.out.println(N-hashSet.size());
} main {
     //スキャン
     final Scanner s = new Scanner(System.in);
     final int N = Integer.parseInt(s.next());
     final int K = Integer.parseInt(s.next());
     HashSet<String> hashSet = new HashSet<String>();

     for(int i=0; i< K;i++){
        int di = Integer.parseInt(s.next());
        String blank = s.nextLine();
        String huge = s.nextLine();

        String[] hage = huge.split(" ",0);
        int hageN= hage.length;
        for (int num =0;num<hageN;num++){
            if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            }
        }

     }
     s.close();

     System.out.println(N-hashSet.size());
} final Scanner s = new Scanner(System.in); s new Scanner(System.in) final int N = Integer.parseInt(s.next()); N Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s final int K = Integer.parseInt(s.next()); K Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s HashSet<String> hashSet = new HashSet<String>(); hashSet new HashSet<String>() for(int i=0; i< K;i++){
        int di = Integer.parseInt(s.next());
        String blank = s.nextLine();
        String huge = s.nextLine();

        String[] hage = huge.split(" ",0);
        int hageN= hage.length;
        for (int num =0;num<hageN;num++){
            if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            }
        }

     } int i=0; int i=0; i 0 i< K i K i++ i++ i {
        int di = Integer.parseInt(s.next());
        String blank = s.nextLine();
        String huge = s.nextLine();

        String[] hage = huge.split(" ",0);
        int hageN= hage.length;
        for (int num =0;num<hageN;num++){
            if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            }
        }

     } {
        int di = Integer.parseInt(s.next());
        String blank = s.nextLine();
        String huge = s.nextLine();

        String[] hage = huge.split(" ",0);
        int hageN= hage.length;
        for (int num =0;num<hageN;num++){
            if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            }
        }

     } int di = Integer.parseInt(s.next()); di Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s String blank = s.nextLine(); blank s.nextLine() s.nextLine s String huge = s.nextLine(); huge s.nextLine() s.nextLine s String[] hage = huge.split(" ",0); hage huge.split(" ",0) huge.split huge " " 0 int hageN= hage.length; hageN hage.length hage hage.length for (int num =0;num<hageN;num++){
            if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            }
        } int num =0; int num =0; num 0 num<hageN num hageN num++ num++ num {
            if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            }
        } {
            if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            }
        } if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            } !hashSet.contains(hage[num]) hashSet.contains(hage[num]) hashSet.contains hashSet hage[num] hage num {
                hashSet.add(hage[num]);
            } hashSet.add(hage[num]) hashSet.add hashSet hage[num] hage num s.close() s.close s System.out.println(N-hashSet.size()) System.out.println System.out System System.out N-hashSet.size() N hashSet.size() hashSet.size hashSet final String[] args args public class Main {
//public class App {
 
    public static void main(final String[] args){
     //スキャン
     final Scanner s = new Scanner(System.in);
     final int N = Integer.parseInt(s.next());
     final int K = Integer.parseInt(s.next());
     HashSet<String> hashSet = new HashSet<String>();

     for(int i=0; i< K;i++){
        int di = Integer.parseInt(s.next());
        String blank = s.nextLine();
        String huge = s.nextLine();

        String[] hage = huge.split(" ",0);
        int hageN= hage.length;
        for (int num =0;num<hageN;num++){
            if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            }
        }

     }
     s.close();

     System.out.println(N-hashSet.size());
}
} public class Main {
//public class App {
 
    public static void main(final String[] args){
     //スキャン
     final Scanner s = new Scanner(System.in);
     final int N = Integer.parseInt(s.next());
     final int K = Integer.parseInt(s.next());
     HashSet<String> hashSet = new HashSet<String>();

     for(int i=0; i< K;i++){
        int di = Integer.parseInt(s.next());
        String blank = s.nextLine();
        String huge = s.nextLine();

        String[] hage = huge.split(" ",0);
        int hageN= hage.length;
        for (int num =0;num<hageN;num++){
            if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            }
        }

     }
     s.close();

     System.out.println(N-hashSet.size());
}
} Main

import java.util.Map.Entry;
import java.util.*;
 
import org.w3c.dom.css.Counter;
 
public class Main {
//public class App {
 
    public static void main(final String[] args){
     //スキャン
     final Scanner s = new Scanner(System.in);
     final int N = Integer.parseInt(s.next());
     final int K = Integer.parseInt(s.next());
     HashSet<String> hashSet = new HashSet<String>();

     for(int i=0; i< K;i++){
        int di = Integer.parseInt(s.next());
        String blank = s.nextLine();
        String huge = s.nextLine();

        String[] hage = huge.split(" ",0);
        int hageN= hage.length;
        for (int num =0;num<hageN;num++){
            if(!hashSet.contains(hage[num])){
                hashSet.add(hage[num]);
            }
        }

     }
     s.close();

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