#include <bits/stdc++.h>
#include <string> 
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define mod 1000000007
#define mid 2019
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define fr(i,a,n) for(i=a;i<n;i++)
#define frn(i,a,n) for(i=a;i<=n;i++)
#define vll vector<ll>
#define pll pair<ll,ll>
#define vp vector<pll>
#define ub upper_bound
#define lb lower_bound
//#define map map<ll,ll>
#define mem(x,y) memset(x,y,sizeof(x))
#define all(v) v.begin(),v.end()
#define bs binary_search
#define qll queue<ll>
#define sll set<ll>
 
 
int main()
{
    fastio;
   
        ll count=0,abs=0,sum=0,index=-1,c=0;
       ll n,k,i,j,d;
       cin>>n>>k;
       ll h[n+1]={0};
       for(i=0;i<k;i++)
       {
           cin>>d;
           ll a[d];
           for(j=0;j<d;j++)
           cin>>a[j];
           
           for(j=0;j<d;j++)
           h[a[j]]++;
           
           
           
       }
       for(i=1;i<n+1;i++)
       {
           if(h[i]==0)
           count++;
       }
       cout<<count<<endl;
    
    
  

}