#include <stdio.h>

int main()
{
    int n, k;
    scanf("%d %d", &n, &k);
    int i = 0, j = 0, x = 0;
    int following_n;
    int snukes[n] = {0};
    int flag = 0;
    int result = 0;

    for (i = 0; i < k; i++)
    {
        scanf("%d", &following_n);
        int following_snukes[following_n];
        for (j = 0; j < following_n; j++)
        {
            scanf("%d", &following_snukes[j]);
        }

        for (j = 0; j < following_n; j++)
        {
            for (x = 0; x < n; x++)
            {
                if (snukes[x] == following_snukes[j])
                {
                    flag = 1;
                    break;
                }
            }
            if (flag == 1)
            {
                continue;
            }
            else
            {
                snukes[following_snukes[j] - 1] = following_snukes[j];
            }
        }
    }

    for (i = 0; i < n; i++)
    {
        if (snukes[i] == 0)
        {
            result += 1;
        }
    }

    printf("%d", result);

    return 0;
}