#include<cstdio>
int f[10001],n,m;
int main(){
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++){
        int x;scanf("%d",&x);
        for(int i=1;i<=x;i++){
            int y;scanf("%d",&y),n-=f[y]==0,f[y]=1;
        }
    }
    printf("%d\n",n);
}