#include<stdio.h>

int jdg_sunuke(int *num, int *data);
int count(int *num, int *data);

int main(void)
{
  int all_num;
  int snack_num;
  int sunuke_num;
  int jdg[100] = {0};
  int cntnum;
  int i;
  
  scanf("%d %d^n", &all_num, &snack_num);
  
  for(i = 0; i < (snack_num*2); i++)
  {
    scanf("%d\n", &sunuke_num);
    jdg_sunuke(&sunuke_num, jdg);
  }
  
  cntnum = count(&all_num, jdg);
  
  printf("%d\n", all_num-cntnum );
}

int jdg_sunuke(int *num, int *data)
{
  int i;
  int temp_num;
  
  for(i = 0;i < *num; i++)
  {
    scanf("%d ", &temp_num);
    data[temp_num-1] = 1;
  }
  
  return 0;
}

int count(int *num, int *data)
{
  int i;
  int outnum = 0;
  
  for(i = 0; i < *num; i++)
  {
    if(data[i] == 1)
    {
      outnum++;
    }
    else
    {
    }
  }
  
  return outnum;
}