import java.io.*;
import java.util.*;
import static java.lang.System.*;
import static java.lang.Math.*;

public class Main
{	
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String []s=br.readLine().split(" ");
		int N=Integer.parseInt(s[0]);
		int K=Integer.parseInt(s[1]);
		
		int a[]=new int[N+1]; //you can use a set instead of array
		
		boolean flag=false;
		String ans="";
		int c=0;
		
		for(int i=0;i<K;i++)
		{
			int d=Integer.parseInt(br.readLine());
			s=br.readLine().split(" ");
			for(int j=0;j<d;j++)
			{
				int x=Integer.parseInt(s[j]);
				if(a[x]==0)
				{
					a[x]=1;
					c++;
				}				
			}
			
		}
		
		out.println(N-c);
		
	}
	
	
}

 import java.io.*; io.* java import java.util.*; util.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main
{	
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String []s=br.readLine().split(" ");
		int N=Integer.parseInt(s[0]);
		int K=Integer.parseInt(s[1]);
		
		int a[]=new int[N+1]; //you can use a set instead of array
		
		boolean flag=false;
		String ans="";
		int c=0;
		
		for(int i=0;i<K;i++)
		{
			int d=Integer.parseInt(br.readLine());
			s=br.readLine().split(" ");
			for(int j=0;j<d;j++)
			{
				int x=Integer.parseInt(s[j]);
				if(a[x]==0)
				{
					a[x]=1;
					c++;
				}				
			}
			
		}
		
		out.println(N-c);
		
	}
	
	
} Main public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String []s=br.readLine().split(" ");
		int N=Integer.parseInt(s[0]);
		int K=Integer.parseInt(s[1]);
		
		int a[]=new int[N+1]; //you can use a set instead of array
		
		boolean flag=false;
		String ans="";
		int c=0;
		
		for(int i=0;i<K;i++)
		{
			int d=Integer.parseInt(br.readLine());
			s=br.readLine().split(" ");
			for(int j=0;j<d;j++)
			{
				int x=Integer.parseInt(s[j]);
				if(a[x]==0)
				{
					a[x]=1;
					c++;
				}				
			}
			
		}
		
		out.println(N-c);
		
	} main {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String []s=br.readLine().split(" ");
		int N=Integer.parseInt(s[0]);
		int K=Integer.parseInt(s[1]);
		
		int a[]=new int[N+1]; //you can use a set instead of array
		
		boolean flag=false;
		String ans="";
		int c=0;
		
		for(int i=0;i<K;i++)
		{
			int d=Integer.parseInt(br.readLine());
			s=br.readLine().split(" ");
			for(int j=0;j<d;j++)
			{
				int x=Integer.parseInt(s[j]);
				if(a[x]==0)
				{
					a[x]=1;
					c++;
				}				
			}
			
		}
		
		out.println(N-c);
		
	} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String []s=br.readLine().split(" "); s br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int N=Integer.parseInt(s[0]); N Integer.parseInt(s[0]) Integer.parseInt Integer s[0] s 0 int K=Integer.parseInt(s[1]); K Integer.parseInt(s[1]) Integer.parseInt Integer s[1] s 1 int a[]=new int[N+1]; a new int[N+1] N+1 N 1 boolean flag=false; flag false String ans=""; ans "" int c=0; c 0 for(int i=0;i<K;i++)
		{
			int d=Integer.parseInt(br.readLine());
			s=br.readLine().split(" ");
			for(int j=0;j<d;j++)
			{
				int x=Integer.parseInt(s[j]);
				if(a[x]==0)
				{
					a[x]=1;
					c++;
				}				
			}
			
		} int i=0; int i=0; i 0 i<K i K i++ i++ i {
			int d=Integer.parseInt(br.readLine());
			s=br.readLine().split(" ");
			for(int j=0;j<d;j++)
			{
				int x=Integer.parseInt(s[j]);
				if(a[x]==0)
				{
					a[x]=1;
					c++;
				}				
			}
			
		} {
			int d=Integer.parseInt(br.readLine());
			s=br.readLine().split(" ");
			for(int j=0;j<d;j++)
			{
				int x=Integer.parseInt(s[j]);
				if(a[x]==0)
				{
					a[x]=1;
					c++;
				}				
			}
			
		} int d=Integer.parseInt(br.readLine()); d Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br s=br.readLine().split(" ") s br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j=0;j<d;j++)
			{
				int x=Integer.parseInt(s[j]);
				if(a[x]==0)
				{
					a[x]=1;
					c++;
				}				
			} int j=0; int j=0; j 0 j<d j d j++ j++ j {
				int x=Integer.parseInt(s[j]);
				if(a[x]==0)
				{
					a[x]=1;
					c++;
				}				
			} {
				int x=Integer.parseInt(s[j]);
				if(a[x]==0)
				{
					a[x]=1;
					c++;
				}				
			} int x=Integer.parseInt(s[j]); x Integer.parseInt(s[j]) Integer.parseInt Integer s[j] s j if(a[x]==0)
				{
					a[x]=1;
					c++;
				} a[x]==0 a[x] a x 0 {
					a[x]=1;
					c++;
				} a[x]=1 a[x] a x 1 c++ c out.println(N-c) out.println out N-c N c String []args args public class Main
{	
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String []s=br.readLine().split(" ");
		int N=Integer.parseInt(s[0]);
		int K=Integer.parseInt(s[1]);
		
		int a[]=new int[N+1]; //you can use a set instead of array
		
		boolean flag=false;
		String ans="";
		int c=0;
		
		for(int i=0;i<K;i++)
		{
			int d=Integer.parseInt(br.readLine());
			s=br.readLine().split(" ");
			for(int j=0;j<d;j++)
			{
				int x=Integer.parseInt(s[j]);
				if(a[x]==0)
				{
					a[x]=1;
					c++;
				}				
			}
			
		}
		
		out.println(N-c);
		
	}
	
	
} public class Main
{	
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String []s=br.readLine().split(" ");
		int N=Integer.parseInt(s[0]);
		int K=Integer.parseInt(s[1]);
		
		int a[]=new int[N+1]; //you can use a set instead of array
		
		boolean flag=false;
		String ans="";
		int c=0;
		
		for(int i=0;i<K;i++)
		{
			int d=Integer.parseInt(br.readLine());
			s=br.readLine().split(" ");
			for(int j=0;j<d;j++)
			{
				int x=Integer.parseInt(s[j]);
				if(a[x]==0)
				{
					a[x]=1;
					c++;
				}				
			}
			
		}
		
		out.println(N-c);
		
	}
	
	
} Main
import java.io.*;
import java.util.*;
import static java.lang.System.*;
import static java.lang.Math.*;

public class Main
{	
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String []s=br.readLine().split(" ");
		int N=Integer.parseInt(s[0]);
		int K=Integer.parseInt(s[1]);
		
		int a[]=new int[N+1]; //you can use a set instead of array
		
		boolean flag=false;
		String ans="";
		int c=0;
		
		for(int i=0;i<K;i++)
		{
			int d=Integer.parseInt(br.readLine());
			s=br.readLine().split(" ");
			for(int j=0;j<d;j++)
			{
				int x=Integer.parseInt(s[j]);
				if(a[x]==0)
				{
					a[x]=1;
					c++;
				}				
			}
			
		}
		
		out.println(N-c);
		
	}
	
	
}


