#include <stdio.h>
int main(void){
  int n,k,d[],a[][],b[],i,j;
  scanf("%d %d",&n,&k);
  for (i=0;i<k;i++){
    scanf("%d",&d[i]);
    for (j=0;j<d[i];j++){
      scanf("%d",&a[i][j]);
      if(b[a[i][j]] == 0){b[a[i][j]]=1;n--;}
    }
  }
  printf("%d",n);
  return 0;
}
  