#include <stdio.h>

int	main(void)
{
  	int	n;
  	int	k;
  	int	d[102];
  	int	a[102][102];
  	int ans[102];
  	int i;
  	int j;
  	int cnt;
  
  	scanf("%d %d\n", &n, &k);
  	for (i=1; i<=n; i++)
  	{
  	    ans[i] = 1;
  	}
  	for (i=1; i<=n; i++)
  	{
      	scanf("%d\n", &d[i]);
      	for (j=0; j<d[i]; j++)
        {
            scanf("%d", &a[i][j]);
            ans[ a[i][j] ] = 0;
        }
  	}

  	cnt = 0;
  	for (i=1; i<=n; i++)
  	{
  	    if (ans[i] == 1)
  	        cnt++;
  	}
  
  	printf("%d", cnt);
  
  	return (0);
}