import java.util.*;
import java.io.*;
public class Main{

     public static void main(String []args) throws IOException{
       
       BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
       
       String a[] = br.readLine().split(" ");
       
        int n = Integer.parseInt(a[0]);
        int k = Integer.parseInt(a[1]);
        Set<Integer> st = new HashSet<>();
        while(k-->0) {
            int count= Integer.parseInt(br.readLine());
            
            String array[] = br.readLine().split(" ");
            for(String x: array) st.add(Integer.parseInt(x));
            
        }
        
        System.out.println(n-st.size());
     }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{

     public static void main(String []args) throws IOException{
       
       BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
       
       String a[] = br.readLine().split(" ");
       
        int n = Integer.parseInt(a[0]);
        int k = Integer.parseInt(a[1]);
        Set<Integer> st = new HashSet<>();
        while(k-->0) {
            int count= Integer.parseInt(br.readLine());
            
            String array[] = br.readLine().split(" ");
            for(String x: array) st.add(Integer.parseInt(x));
            
        }
        
        System.out.println(n-st.size());
     }
} Main public static void main(String []args) throws IOException{
       
       BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
       
       String a[] = br.readLine().split(" ");
       
        int n = Integer.parseInt(a[0]);
        int k = Integer.parseInt(a[1]);
        Set<Integer> st = new HashSet<>();
        while(k-->0) {
            int count= Integer.parseInt(br.readLine());
            
            String array[] = br.readLine().split(" ");
            for(String x: array) st.add(Integer.parseInt(x));
            
        }
        
        System.out.println(n-st.size());
     } main {
       
       BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
       
       String a[] = br.readLine().split(" ");
       
        int n = Integer.parseInt(a[0]);
        int k = Integer.parseInt(a[1]);
        Set<Integer> st = new HashSet<>();
        while(k-->0) {
            int count= Integer.parseInt(br.readLine());
            
            String array[] = br.readLine().split(" ");
            for(String x: array) st.add(Integer.parseInt(x));
            
        }
        
        System.out.println(n-st.size());
     } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String a[] = br.readLine().split(" "); a br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(a[0]); n Integer.parseInt(a[0]) Integer.parseInt Integer a[0] a 0 int k = Integer.parseInt(a[1]); k Integer.parseInt(a[1]) Integer.parseInt Integer a[1] a 1 Set<Integer> st = new HashSet<>(); st new HashSet<>() while(k-->0) {
            int count= Integer.parseInt(br.readLine());
            
            String array[] = br.readLine().split(" ");
            for(String x: array) st.add(Integer.parseInt(x));
            
        } k-->0 k-- k 0 {
            int count= Integer.parseInt(br.readLine());
            
            String array[] = br.readLine().split(" ");
            for(String x: array) st.add(Integer.parseInt(x));
            
        } int count= Integer.parseInt(br.readLine()); count Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String array[] = br.readLine().split(" "); array br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(String x: array) st.add(Integer.parseInt(x)); String x array st.add(Integer.parseInt(x)); st.add(Integer.parseInt(x)) st.add st Integer.parseInt(x) Integer.parseInt Integer x System.out.println(n-st.size()) System.out.println System.out System System.out n-st.size() n st.size() st.size st String []args args public class Main{

     public static void main(String []args) throws IOException{
       
       BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
       
       String a[] = br.readLine().split(" ");
       
        int n = Integer.parseInt(a[0]);
        int k = Integer.parseInt(a[1]);
        Set<Integer> st = new HashSet<>();
        while(k-->0) {
            int count= Integer.parseInt(br.readLine());
            
            String array[] = br.readLine().split(" ");
            for(String x: array) st.add(Integer.parseInt(x));
            
        }
        
        System.out.println(n-st.size());
     }
} public class Main{

     public static void main(String []args) throws IOException{
       
       BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
       
       String a[] = br.readLine().split(" ");
       
        int n = Integer.parseInt(a[0]);
        int k = Integer.parseInt(a[1]);
        Set<Integer> st = new HashSet<>();
        while(k-->0) {
            int count= Integer.parseInt(br.readLine());
            
            String array[] = br.readLine().split(" ");
            for(String x: array) st.add(Integer.parseInt(x));
            
        }
        
        System.out.println(n-st.size());
     }
} Main
import java.util.*;
import java.io.*;
public class Main{

     public static void main(String []args) throws IOException{
       
       BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
       
       String a[] = br.readLine().split(" ");
       
        int n = Integer.parseInt(a[0]);
        int k = Integer.parseInt(a[1]);
        Set<Integer> st = new HashSet<>();
        while(k-->0) {
            int count= Integer.parseInt(br.readLine());
            
            String array[] = br.readLine().split(" ");
            for(String x: array) st.add(Integer.parseInt(x));
            
        }
        
        System.out.println(n-st.size());
     }
}