

import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String i1[]=br.readLine().split(" ");
		int n=Integer.parseInt(i1[0]);
		int k=Integer.parseInt(i1[1]);
		
		long a[]=new long[n+1];
		int count=0;
		String line = br.readLine();
		while ( line != null  &&  !line.equals("")) {
		    
	    	int snack=Integer.parseInt(line);
			String users[]=br.readLine().split(" ");
			for(int i=0;i<users.length;i++)
			{
				a[Integer.parseInt(users[i])-1]++;
			}
			
			line=br.readLine();
		}
		for(int i=0;i<n;i++)
		{
			if(a[i]==0)
			{
				count++;
			}
		}
		
		System.out.println(count);
	}

} import java.util.*; util.* java import java.io.*; io.* java public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String i1[]=br.readLine().split(" ");
		int n=Integer.parseInt(i1[0]);
		int k=Integer.parseInt(i1[1]);
		
		long a[]=new long[n+1];
		int count=0;
		String line = br.readLine();
		while ( line != null  &&  !line.equals("")) {
		    
	    	int snack=Integer.parseInt(line);
			String users[]=br.readLine().split(" ");
			for(int i=0;i<users.length;i++)
			{
				a[Integer.parseInt(users[i])-1]++;
			}
			
			line=br.readLine();
		}
		for(int i=0;i<n;i++)
		{
			if(a[i]==0)
			{
				count++;
			}
		}
		
		System.out.println(count);
	}

} Main public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String i1[]=br.readLine().split(" ");
		int n=Integer.parseInt(i1[0]);
		int k=Integer.parseInt(i1[1]);
		
		long a[]=new long[n+1];
		int count=0;
		String line = br.readLine();
		while ( line != null  &&  !line.equals("")) {
		    
	    	int snack=Integer.parseInt(line);
			String users[]=br.readLine().split(" ");
			for(int i=0;i<users.length;i++)
			{
				a[Integer.parseInt(users[i])-1]++;
			}
			
			line=br.readLine();
		}
		for(int i=0;i<n;i++)
		{
			if(a[i]==0)
			{
				count++;
			}
		}
		
		System.out.println(count);
	} main {
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String i1[]=br.readLine().split(" ");
		int n=Integer.parseInt(i1[0]);
		int k=Integer.parseInt(i1[1]);
		
		long a[]=new long[n+1];
		int count=0;
		String line = br.readLine();
		while ( line != null  &&  !line.equals("")) {
		    
	    	int snack=Integer.parseInt(line);
			String users[]=br.readLine().split(" ");
			for(int i=0;i<users.length;i++)
			{
				a[Integer.parseInt(users[i])-1]++;
			}
			
			line=br.readLine();
		}
		for(int i=0;i<n;i++)
		{
			if(a[i]==0)
			{
				count++;
			}
		}
		
		System.out.println(count);
	} BufferedReader br =new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String i1[]=br.readLine().split(" "); i1 br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n=Integer.parseInt(i1[0]); n Integer.parseInt(i1[0]) Integer.parseInt Integer i1[0] i1 0 int k=Integer.parseInt(i1[1]); k Integer.parseInt(i1[1]) Integer.parseInt Integer i1[1] i1 1 long a[]=new long[n+1]; a new long[n+1] n+1 n 1 int count=0; count 0 String line = br.readLine(); line br.readLine() br.readLine br while ( line != null  &&  !line.equals("")) {
		    
	    	int snack=Integer.parseInt(line);
			String users[]=br.readLine().split(" ");
			for(int i=0;i<users.length;i++)
			{
				a[Integer.parseInt(users[i])-1]++;
			}
			
			line=br.readLine();
		} line != null  &&  !line.equals("") line != null line null !line.equals("") line.equals("") line.equals line "" {
		    
	    	int snack=Integer.parseInt(line);
			String users[]=br.readLine().split(" ");
			for(int i=0;i<users.length;i++)
			{
				a[Integer.parseInt(users[i])-1]++;
			}
			
			line=br.readLine();
		} int snack=Integer.parseInt(line); snack Integer.parseInt(line) Integer.parseInt Integer line String users[]=br.readLine().split(" "); users br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int i=0;i<users.length;i++)
			{
				a[Integer.parseInt(users[i])-1]++;
			} int i=0; int i=0; i 0 i<users.length i users.length users users.length i++ i++ i {
				a[Integer.parseInt(users[i])-1]++;
			} {
				a[Integer.parseInt(users[i])-1]++;
			} a[Integer.parseInt(users[i])-1]++ a[Integer.parseInt(users[i])-1] a Integer.parseInt(users[i])-1 Integer.parseInt(users[i]) Integer.parseInt Integer users[i] users i 1 line=br.readLine() line br.readLine() br.readLine br for(int i=0;i<n;i++)
		{
			if(a[i]==0)
			{
				count++;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if(a[i]==0)
			{
				count++;
			}
		} {
			if(a[i]==0)
			{
				count++;
			}
		} if(a[i]==0)
			{
				count++;
			} a[i]==0 a[i] a i 0 {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String i1[]=br.readLine().split(" ");
		int n=Integer.parseInt(i1[0]);
		int k=Integer.parseInt(i1[1]);
		
		long a[]=new long[n+1];
		int count=0;
		String line = br.readLine();
		while ( line != null  &&  !line.equals("")) {
		    
	    	int snack=Integer.parseInt(line);
			String users[]=br.readLine().split(" ");
			for(int i=0;i<users.length;i++)
			{
				a[Integer.parseInt(users[i])-1]++;
			}
			
			line=br.readLine();
		}
		for(int i=0;i<n;i++)
		{
			if(a[i]==0)
			{
				count++;
			}
		}
		
		System.out.println(count);
	}

} public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String i1[]=br.readLine().split(" ");
		int n=Integer.parseInt(i1[0]);
		int k=Integer.parseInt(i1[1]);
		
		long a[]=new long[n+1];
		int count=0;
		String line = br.readLine();
		while ( line != null  &&  !line.equals("")) {
		    
	    	int snack=Integer.parseInt(line);
			String users[]=br.readLine().split(" ");
			for(int i=0;i<users.length;i++)
			{
				a[Integer.parseInt(users[i])-1]++;
			}
			
			line=br.readLine();
		}
		for(int i=0;i<n;i++)
		{
			if(a[i]==0)
			{
				count++;
			}
		}
		
		System.out.println(count);
	}

} Main


import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String i1[]=br.readLine().split(" ");
		int n=Integer.parseInt(i1[0]);
		int k=Integer.parseInt(i1[1]);
		
		long a[]=new long[n+1];
		int count=0;
		String line = br.readLine();
		while ( line != null  &&  !line.equals("")) {
		    
	    	int snack=Integer.parseInt(line);
			String users[]=br.readLine().split(" ");
			for(int i=0;i<users.length;i++)
			{
				a[Integer.parseInt(users[i])-1]++;
			}
			
			line=br.readLine();
		}
		for(int i=0;i<n;i++)
		{
			if(a[i]==0)
			{
				count++;
			}
		}
		
		System.out.println(count);
	}

}
