import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    int[] d = new int[k];
    int[] count = new int[n];
    for(int i=0; i<k; i++) {
      d[i] = Integer.parseInt(in.readLine());
      int[][] a = new int[k][d[i]];
      str = in.readLine().split(" ");
      for(int j=0; j<d[i]; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        count[a[i][j]-1]++;
      }
    }
    
    int ans = 0;
    for(int i=0; i<n; i++) {
      if(count[i]==0)
        ans++;
    }
    
    System.out.println(ans);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    int[] d = new int[k];
    int[] count = new int[n];
    for(int i=0; i<k; i++) {
      d[i] = Integer.parseInt(in.readLine());
      int[][] a = new int[k][d[i]];
      str = in.readLine().split(" ");
      for(int j=0; j<d[i]; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        count[a[i][j]-1]++;
      }
    }
    
    int ans = 0;
    for(int i=0; i<n; i++) {
      if(count[i]==0)
        ans++;
    }
    
    System.out.println(ans);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    int[] d = new int[k];
    int[] count = new int[n];
    for(int i=0; i<k; i++) {
      d[i] = Integer.parseInt(in.readLine());
      int[][] a = new int[k][d[i]];
      str = in.readLine().split(" ");
      for(int j=0; j<d[i]; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        count[a[i][j]-1]++;
      }
    }
    
    int ans = 0;
    for(int i=0; i<n; i++) {
      if(count[i]==0)
        ans++;
    }
    
    System.out.println(ans);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    int[] d = new int[k];
    int[] count = new int[n];
    for(int i=0; i<k; i++) {
      d[i] = Integer.parseInt(in.readLine());
      int[][] a = new int[k][d[i]];
      str = in.readLine().split(" ");
      for(int j=0; j<d[i]; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        count[a[i][j]-1]++;
      }
    }
    
    int ans = 0;
    for(int i=0; i<n; i++) {
      if(count[i]==0)
        ans++;
    }
    
    System.out.println(ans);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] str = in.readLine().split(" "); str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int n = Integer.parseInt(str[0]); n Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int k = Integer.parseInt(str[1]); k Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int[] d = new int[k]; d new int[k] k int[] count = new int[n]; count new int[n] n for(int i=0; i<k; i++) {
      d[i] = Integer.parseInt(in.readLine());
      int[][] a = new int[k][d[i]];
      str = in.readLine().split(" ");
      for(int j=0; j<d[i]; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        count[a[i][j]-1]++;
      }
    } int i=0; int i=0; i 0 i<k i k i++ i++ i {
      d[i] = Integer.parseInt(in.readLine());
      int[][] a = new int[k][d[i]];
      str = in.readLine().split(" ");
      for(int j=0; j<d[i]; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        count[a[i][j]-1]++;
      }
    } {
      d[i] = Integer.parseInt(in.readLine());
      int[][] a = new int[k][d[i]];
      str = in.readLine().split(" ");
      for(int j=0; j<d[i]; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        count[a[i][j]-1]++;
      }
    } d[i] = Integer.parseInt(in.readLine()) d[i] d i Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in int[][] a = new int[k][d[i]]; a new int[k][d[i]] k d[i] d i str = in.readLine().split(" ") str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " for(int j=0; j<d[i]; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        count[a[i][j]-1]++;
      } int j=0; int j=0; j 0 j<d[i] j d[i] d i j++ j++ j {
        a[i][j] = Integer.parseInt(str[j]);
        count[a[i][j]-1]++;
      } {
        a[i][j] = Integer.parseInt(str[j]);
        count[a[i][j]-1]++;
      } a[i][j] = Integer.parseInt(str[j]) a[i][j] a[i] a i j Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j count[a[i][j]-1]++ count[a[i][j]-1] count a[i][j]-1 a[i][j] a[i] a i j 1 int ans = 0; ans 0 for(int i=0; i<n; i++) {
      if(count[i]==0)
        ans++;
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      if(count[i]==0)
        ans++;
    } {
      if(count[i]==0)
        ans++;
    } if(count[i]==0)
        ans++; count[i]==0 count[i] count i 0 ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    int[] d = new int[k];
    int[] count = new int[n];
    for(int i=0; i<k; i++) {
      d[i] = Integer.parseInt(in.readLine());
      int[][] a = new int[k][d[i]];
      str = in.readLine().split(" ");
      for(int j=0; j<d[i]; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        count[a[i][j]-1]++;
      }
    }
    
    int ans = 0;
    for(int i=0; i<n; i++) {
      if(count[i]==0)
        ans++;
    }
    
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    int[] d = new int[k];
    int[] count = new int[n];
    for(int i=0; i<k; i++) {
      d[i] = Integer.parseInt(in.readLine());
      int[][] a = new int[k][d[i]];
      str = in.readLine().split(" ");
      for(int j=0; j<d[i]; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        count[a[i][j]-1]++;
      }
    }
    
    int ans = 0;
    for(int i=0; i<n; i++) {
      if(count[i]==0)
        ans++;
    }
    
    System.out.println(ans);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    int[] d = new int[k];
    int[] count = new int[n];
    for(int i=0; i<k; i++) {
      d[i] = Integer.parseInt(in.readLine());
      int[][] a = new int[k][d[i]];
      str = in.readLine().split(" ");
      for(int j=0; j<d[i]; j++) {
        a[i][j] = Integer.parseInt(str[j]);
        count[a[i][j]-1]++;
      }
    }
    
    int ans = 0;
    for(int i=0; i<n; i++) {
      if(count[i]==0)
        ans++;
    }
    
    System.out.println(ans);
  }
}