#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

int main(void){
  int N,K;
  scanf("%d%d",&N,&K);
  int d[K+1];
  int treat = 0;
  bool sunuke[N+1];
  for(int i=1;i<=N;i++){
  	sunuke[i] = false;
  }
  
  for(int i=1;i<=K;i++){
  	scanf("%d",&d[i]);
    int A[d[i]+1];
    for(int j=1;j<=d[i];i++){
    	scanf("%d",&A[j]);
        sunuke[A[j]] = true;
    }
  }
  
  for(int i=1;i<=N;i++){
  	if(sunuke[i] == false) treat++;
  }
 
  printf("%d",N - treat);
  
  return 0;
}