/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
If I'm the sun, you're the moon
Because when I go up, you go down
*******************************
I'm working for the day I will surpass you
https://www.a2oj.com/Ladder16.html
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class Main
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int K = Integer.parseInt(st.nextToken());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int i=1; i <= N; i++)
            set.add(i);
         for(int qw=0; qw < K; qw++)
         {
            int d = Integer.parseInt(infile.readLine());
            int[] arr = new int[d];
            st = new StringTokenizer(infile.readLine());
            for(int i=0; i < d; i++)
               arr[i] = Integer.parseInt(st.nextToken());
            for(int x: arr)
               if(set.contains(x))
                  set.remove(x);
         }
         System.out.println(set.size());
      }
   } import java.util.*; util.* java import java.io.*; io.* java import java.math.*; math.* java public class Main
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int K = Integer.parseInt(st.nextToken());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int i=1; i <= N; i++)
            set.add(i);
         for(int qw=0; qw < K; qw++)
         {
            int d = Integer.parseInt(infile.readLine());
            int[] arr = new int[d];
            st = new StringTokenizer(infile.readLine());
            for(int i=0; i < d; i++)
               arr[i] = Integer.parseInt(st.nextToken());
            for(int x: arr)
               if(set.contains(x))
                  set.remove(x);
         }
         System.out.println(set.size());
      }
   } Main public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int K = Integer.parseInt(st.nextToken());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int i=1; i <= N; i++)
            set.add(i);
         for(int qw=0; qw < K; qw++)
         {
            int d = Integer.parseInt(infile.readLine());
            int[] arr = new int[d];
            st = new StringTokenizer(infile.readLine());
            for(int i=0; i < d; i++)
               arr[i] = Integer.parseInt(st.nextToken());
            for(int x: arr)
               if(set.contains(x))
                  set.remove(x);
         }
         System.out.println(set.size());
      } main {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int K = Integer.parseInt(st.nextToken());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int i=1; i <= N; i++)
            set.add(i);
         for(int qw=0; qw < K; qw++)
         {
            int d = Integer.parseInt(infile.readLine());
            int[] arr = new int[d];
            st = new StringTokenizer(infile.readLine());
            for(int i=0; i < d; i++)
               arr[i] = Integer.parseInt(st.nextToken());
            for(int x: arr)
               if(set.contains(x))
                  set.remove(x);
         }
         System.out.println(set.size());
      } BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); infile new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(infile.readLine()); st new StringTokenizer(infile.readLine()) int N = Integer.parseInt(st.nextToken()); N Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int K = Integer.parseInt(st.nextToken()); K Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st HashSet<Integer> set = new HashSet<Integer>(); set new HashSet<Integer>() for(int i=1; i <= N; i++)
            set.add(i); int i=1; int i=1; i 1 i <= N i N i++ i++ i set.add(i); set.add(i) set.add set i for(int qw=0; qw < K; qw++)
         {
            int d = Integer.parseInt(infile.readLine());
            int[] arr = new int[d];
            st = new StringTokenizer(infile.readLine());
            for(int i=0; i < d; i++)
               arr[i] = Integer.parseInt(st.nextToken());
            for(int x: arr)
               if(set.contains(x))
                  set.remove(x);
         } int qw=0; int qw=0; qw 0 qw < K qw K qw++ qw++ qw {
            int d = Integer.parseInt(infile.readLine());
            int[] arr = new int[d];
            st = new StringTokenizer(infile.readLine());
            for(int i=0; i < d; i++)
               arr[i] = Integer.parseInt(st.nextToken());
            for(int x: arr)
               if(set.contains(x))
                  set.remove(x);
         } {
            int d = Integer.parseInt(infile.readLine());
            int[] arr = new int[d];
            st = new StringTokenizer(infile.readLine());
            for(int i=0; i < d; i++)
               arr[i] = Integer.parseInt(st.nextToken());
            for(int x: arr)
               if(set.contains(x))
                  set.remove(x);
         } int d = Integer.parseInt(infile.readLine()); d Integer.parseInt(infile.readLine()) Integer.parseInt Integer infile.readLine() infile.readLine infile int[] arr = new int[d]; arr new int[d] d st = new StringTokenizer(infile.readLine()) st new StringTokenizer(infile.readLine()) for(int i=0; i < d; i++)
               arr[i] = Integer.parseInt(st.nextToken()); int i=0; int i=0; i 0 i < d i d i++ i++ i arr[i] = Integer.parseInt(st.nextToken()); arr[i] = Integer.parseInt(st.nextToken()) arr[i] arr i Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st for(int x: arr)
               if(set.contains(x))
                  set.remove(x); int x arr if(set.contains(x))
                  set.remove(x); if(set.contains(x))
                  set.remove(x); set.contains(x) set.contains set x set.remove(x) set.remove set x System.out.println(set.size()) System.out.println System.out System System.out set.size() set.size set String omkar[] omkar public class Main
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int K = Integer.parseInt(st.nextToken());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int i=1; i <= N; i++)
            set.add(i);
         for(int qw=0; qw < K; qw++)
         {
            int d = Integer.parseInt(infile.readLine());
            int[] arr = new int[d];
            st = new StringTokenizer(infile.readLine());
            for(int i=0; i < d; i++)
               arr[i] = Integer.parseInt(st.nextToken());
            for(int x: arr)
               if(set.contains(x))
                  set.remove(x);
         }
         System.out.println(set.size());
      }
   } public class Main
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int K = Integer.parseInt(st.nextToken());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int i=1; i <= N; i++)
            set.add(i);
         for(int qw=0; qw < K; qw++)
         {
            int d = Integer.parseInt(infile.readLine());
            int[] arr = new int[d];
            st = new StringTokenizer(infile.readLine());
            for(int i=0; i < d; i++)
               arr[i] = Integer.parseInt(st.nextToken());
            for(int x: arr)
               if(set.contains(x))
                  set.remove(x);
         }
         System.out.println(set.size());
      }
   } Main
/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
If I'm the sun, you're the moon
Because when I go up, you go down
*******************************
I'm working for the day I will surpass you
https://www.a2oj.com/Ladder16.html
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class Main
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int K = Integer.parseInt(st.nextToken());
         HashSet<Integer> set = new HashSet<Integer>();
         for(int i=1; i <= N; i++)
            set.add(i);
         for(int qw=0; qw < K; qw++)
         {
            int d = Integer.parseInt(infile.readLine());
            int[] arr = new int[d];
            st = new StringTokenizer(infile.readLine());
            for(int i=0; i < d; i++)
               arr[i] = Integer.parseInt(st.nextToken());
            for(int x: arr)
               if(set.contains(x))
                  set.remove(x);
         }
         System.out.println(set.size());
      }
   }