import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        String line1 = sc.nextLine();
        String[] array = line1.split(" ");
        
        int n = Integer.parseInt(array[0]);
        int k = Integer.parseInt(array[1]);
        
        int[] sunuke = new int[n];
        
        for(int i = 0; i < k; i++)
        {
            String buf1 = sc.nextLine();
            int ninzu = Integer.parseInt(buf1);
            String buf2 = sc.nextLine();
            String[] okasimoti = buf2.split(" ");
            
            for(int j = 0; j < ninzu; j++)
            {
                int buf3 = Integer.parseInt(okasimoti[j]);
                sunuke[buf3 - 1]++;
            }
        }
        
        int count = 0;
        for(int i = 0; i < n; i++)
        {
            if(sunuke[i] == 0)
            {
                count++;
            }
        }
        
        
        System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        String line1 = sc.nextLine();
        String[] array = line1.split(" ");
        
        int n = Integer.parseInt(array[0]);
        int k = Integer.parseInt(array[1]);
        
        int[] sunuke = new int[n];
        
        for(int i = 0; i < k; i++)
        {
            String buf1 = sc.nextLine();
            int ninzu = Integer.parseInt(buf1);
            String buf2 = sc.nextLine();
            String[] okasimoti = buf2.split(" ");
            
            for(int j = 0; j < ninzu; j++)
            {
                int buf3 = Integer.parseInt(okasimoti[j]);
                sunuke[buf3 - 1]++;
            }
        }
        
        int count = 0;
        for(int i = 0; i < n; i++)
        {
            if(sunuke[i] == 0)
            {
                count++;
            }
        }
        
        
        System.out.println(count);
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        String line1 = sc.nextLine();
        String[] array = line1.split(" ");
        
        int n = Integer.parseInt(array[0]);
        int k = Integer.parseInt(array[1]);
        
        int[] sunuke = new int[n];
        
        for(int i = 0; i < k; i++)
        {
            String buf1 = sc.nextLine();
            int ninzu = Integer.parseInt(buf1);
            String buf2 = sc.nextLine();
            String[] okasimoti = buf2.split(" ");
            
            for(int j = 0; j < ninzu; j++)
            {
                int buf3 = Integer.parseInt(okasimoti[j]);
                sunuke[buf3 - 1]++;
            }
        }
        
        int count = 0;
        for(int i = 0; i < n; i++)
        {
            if(sunuke[i] == 0)
            {
                count++;
            }
        }
        
        
        System.out.println(count);
    } main {
        
        Scanner sc = new Scanner(System.in);
        String line1 = sc.nextLine();
        String[] array = line1.split(" ");
        
        int n = Integer.parseInt(array[0]);
        int k = Integer.parseInt(array[1]);
        
        int[] sunuke = new int[n];
        
        for(int i = 0; i < k; i++)
        {
            String buf1 = sc.nextLine();
            int ninzu = Integer.parseInt(buf1);
            String buf2 = sc.nextLine();
            String[] okasimoti = buf2.split(" ");
            
            for(int j = 0; j < ninzu; j++)
            {
                int buf3 = Integer.parseInt(okasimoti[j]);
                sunuke[buf3 - 1]++;
            }
        }
        
        int count = 0;
        for(int i = 0; i < n; i++)
        {
            if(sunuke[i] == 0)
            {
                count++;
            }
        }
        
        
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line1 = sc.nextLine(); line1 sc.nextLine() sc.nextLine sc String[] array = line1.split(" "); array line1.split(" ") line1.split line1 " " int n = Integer.parseInt(array[0]); n Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 int k = Integer.parseInt(array[1]); k Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 int[] sunuke = new int[n]; sunuke new int[n] n for(int i = 0; i < k; i++)
        {
            String buf1 = sc.nextLine();
            int ninzu = Integer.parseInt(buf1);
            String buf2 = sc.nextLine();
            String[] okasimoti = buf2.split(" ");
            
            for(int j = 0; j < ninzu; j++)
            {
                int buf3 = Integer.parseInt(okasimoti[j]);
                sunuke[buf3 - 1]++;
            }
        } int i = 0; int i = 0; i 0 i < k i k i++ i++ i {
            String buf1 = sc.nextLine();
            int ninzu = Integer.parseInt(buf1);
            String buf2 = sc.nextLine();
            String[] okasimoti = buf2.split(" ");
            
            for(int j = 0; j < ninzu; j++)
            {
                int buf3 = Integer.parseInt(okasimoti[j]);
                sunuke[buf3 - 1]++;
            }
        } {
            String buf1 = sc.nextLine();
            int ninzu = Integer.parseInt(buf1);
            String buf2 = sc.nextLine();
            String[] okasimoti = buf2.split(" ");
            
            for(int j = 0; j < ninzu; j++)
            {
                int buf3 = Integer.parseInt(okasimoti[j]);
                sunuke[buf3 - 1]++;
            }
        } String buf1 = sc.nextLine(); buf1 sc.nextLine() sc.nextLine sc int ninzu = Integer.parseInt(buf1); ninzu Integer.parseInt(buf1) Integer.parseInt Integer buf1 String buf2 = sc.nextLine(); buf2 sc.nextLine() sc.nextLine sc String[] okasimoti = buf2.split(" "); okasimoti buf2.split(" ") buf2.split buf2 " " for(int j = 0; j < ninzu; j++)
            {
                int buf3 = Integer.parseInt(okasimoti[j]);
                sunuke[buf3 - 1]++;
            } int j = 0; int j = 0; j 0 j < ninzu j ninzu j++ j++ j {
                int buf3 = Integer.parseInt(okasimoti[j]);
                sunuke[buf3 - 1]++;
            } {
                int buf3 = Integer.parseInt(okasimoti[j]);
                sunuke[buf3 - 1]++;
            } int buf3 = Integer.parseInt(okasimoti[j]); buf3 Integer.parseInt(okasimoti[j]) Integer.parseInt Integer okasimoti[j] okasimoti j sunuke[buf3 - 1]++ sunuke[buf3 - 1] sunuke buf3 - 1 buf3 1 int count = 0; count 0 for(int i = 0; i < n; i++)
        {
            if(sunuke[i] == 0)
            {
                count++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if(sunuke[i] == 0)
            {
                count++;
            }
        } {
            if(sunuke[i] == 0)
            {
                count++;
            }
        } if(sunuke[i] == 0)
            {
                count++;
            } sunuke[i] == 0 sunuke[i] sunuke i 0 {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        String line1 = sc.nextLine();
        String[] array = line1.split(" ");
        
        int n = Integer.parseInt(array[0]);
        int k = Integer.parseInt(array[1]);
        
        int[] sunuke = new int[n];
        
        for(int i = 0; i < k; i++)
        {
            String buf1 = sc.nextLine();
            int ninzu = Integer.parseInt(buf1);
            String buf2 = sc.nextLine();
            String[] okasimoti = buf2.split(" ");
            
            for(int j = 0; j < ninzu; j++)
            {
                int buf3 = Integer.parseInt(okasimoti[j]);
                sunuke[buf3 - 1]++;
            }
        }
        
        int count = 0;
        for(int i = 0; i < n; i++)
        {
            if(sunuke[i] == 0)
            {
                count++;
            }
        }
        
        
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        String line1 = sc.nextLine();
        String[] array = line1.split(" ");
        
        int n = Integer.parseInt(array[0]);
        int k = Integer.parseInt(array[1]);
        
        int[] sunuke = new int[n];
        
        for(int i = 0; i < k; i++)
        {
            String buf1 = sc.nextLine();
            int ninzu = Integer.parseInt(buf1);
            String buf2 = sc.nextLine();
            String[] okasimoti = buf2.split(" ");
            
            for(int j = 0; j < ninzu; j++)
            {
                int buf3 = Integer.parseInt(okasimoti[j]);
                sunuke[buf3 - 1]++;
            }
        }
        
        int count = 0;
        for(int i = 0; i < n; i++)
        {
            if(sunuke[i] == 0)
            {
                count++;
            }
        }
        
        
        System.out.println(count);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        String line1 = sc.nextLine();
        String[] array = line1.split(" ");
        
        int n = Integer.parseInt(array[0]);
        int k = Integer.parseInt(array[1]);
        
        int[] sunuke = new int[n];
        
        for(int i = 0; i < k; i++)
        {
            String buf1 = sc.nextLine();
            int ninzu = Integer.parseInt(buf1);
            String buf2 = sc.nextLine();
            String[] okasimoti = buf2.split(" ");
            
            for(int j = 0; j < ninzu; j++)
            {
                int buf3 = Integer.parseInt(okasimoti[j]);
                sunuke[buf3 - 1]++;
            }
        }
        
        int count = 0;
        for(int i = 0; i < n; i++)
        {
            if(sunuke[i] == 0)
            {
                count++;
            }
        }
        
        
        System.out.println(count);
    }
}
