import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		 Scanner sc = new Scanner(System.in);
		 int N=sc.nextInt();
		 int K=sc.nextInt();
		 int d[]=new int[K];
		 int A[][]=new int[K][N];
		 for(int i=0;i<K;i++) {
			 d[i]=sc.nextInt();
			 for(int count=0;count<d[i];count++) {
				 A[i][count]=sc.nextInt();
			 }
		 }
		 boolean student[]=new boolean[N];
		 for(int i=0;i<N;i++)
			 student[i]=false;
		 for(int i=0;i<K;i++) {
			 for(int count=0;count<N;count++) {
				 if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true;
			 }
		 }
		 int num=0;
		 for(int i=0;i<N;i++) {
			 if(student[i]==false)
				 num++;
		 }
	     System.out.println(num);
	     sc.close();
	 }
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		 Scanner sc = new Scanner(System.in);
		 int N=sc.nextInt();
		 int K=sc.nextInt();
		 int d[]=new int[K];
		 int A[][]=new int[K][N];
		 for(int i=0;i<K;i++) {
			 d[i]=sc.nextInt();
			 for(int count=0;count<d[i];count++) {
				 A[i][count]=sc.nextInt();
			 }
		 }
		 boolean student[]=new boolean[N];
		 for(int i=0;i<N;i++)
			 student[i]=false;
		 for(int i=0;i<K;i++) {
			 for(int count=0;count<N;count++) {
				 if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true;
			 }
		 }
		 int num=0;
		 for(int i=0;i<N;i++) {
			 if(student[i]==false)
				 num++;
		 }
	     System.out.println(num);
	     sc.close();
	 }
} Main public static void main(String[] args){
		 Scanner sc = new Scanner(System.in);
		 int N=sc.nextInt();
		 int K=sc.nextInt();
		 int d[]=new int[K];
		 int A[][]=new int[K][N];
		 for(int i=0;i<K;i++) {
			 d[i]=sc.nextInt();
			 for(int count=0;count<d[i];count++) {
				 A[i][count]=sc.nextInt();
			 }
		 }
		 boolean student[]=new boolean[N];
		 for(int i=0;i<N;i++)
			 student[i]=false;
		 for(int i=0;i<K;i++) {
			 for(int count=0;count<N;count++) {
				 if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true;
			 }
		 }
		 int num=0;
		 for(int i=0;i<N;i++) {
			 if(student[i]==false)
				 num++;
		 }
	     System.out.println(num);
	     sc.close();
	 } main {
		 Scanner sc = new Scanner(System.in);
		 int N=sc.nextInt();
		 int K=sc.nextInt();
		 int d[]=new int[K];
		 int A[][]=new int[K][N];
		 for(int i=0;i<K;i++) {
			 d[i]=sc.nextInt();
			 for(int count=0;count<d[i];count++) {
				 A[i][count]=sc.nextInt();
			 }
		 }
		 boolean student[]=new boolean[N];
		 for(int i=0;i<N;i++)
			 student[i]=false;
		 for(int i=0;i<K;i++) {
			 for(int count=0;count<N;count++) {
				 if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true;
			 }
		 }
		 int num=0;
		 for(int i=0;i<N;i++) {
			 if(student[i]==false)
				 num++;
		 }
	     System.out.println(num);
	     sc.close();
	 } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N=sc.nextInt(); N sc.nextInt() sc.nextInt sc int K=sc.nextInt(); K sc.nextInt() sc.nextInt sc int d[]=new int[K]; d new int[K] K int A[][]=new int[K][N]; A new int[K][N] K N for(int i=0;i<K;i++) {
			 d[i]=sc.nextInt();
			 for(int count=0;count<d[i];count++) {
				 A[i][count]=sc.nextInt();
			 }
		 } int i=0; int i=0; i 0 i<K i K i++ i++ i {
			 d[i]=sc.nextInt();
			 for(int count=0;count<d[i];count++) {
				 A[i][count]=sc.nextInt();
			 }
		 } {
			 d[i]=sc.nextInt();
			 for(int count=0;count<d[i];count++) {
				 A[i][count]=sc.nextInt();
			 }
		 } d[i]=sc.nextInt() d[i] d i sc.nextInt() sc.nextInt sc for(int count=0;count<d[i];count++) {
				 A[i][count]=sc.nextInt();
			 } int count=0; int count=0; count 0 count<d[i] count d[i] d i count++ count++ count {
				 A[i][count]=sc.nextInt();
			 } {
				 A[i][count]=sc.nextInt();
			 } A[i][count]=sc.nextInt() A[i][count] A[i] A i count sc.nextInt() sc.nextInt sc boolean student[]=new boolean[N]; student new boolean[N] N for(int i=0;i<N;i++)
			 student[i]=false; int i=0; int i=0; i 0 i<N i N i++ i++ i student[i]=false; student[i]=false student[i] student i false for(int i=0;i<K;i++) {
			 for(int count=0;count<N;count++) {
				 if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true;
			 }
		 } int i=0; int i=0; i 0 i<K i K i++ i++ i {
			 for(int count=0;count<N;count++) {
				 if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true;
			 }
		 } {
			 for(int count=0;count<N;count++) {
				 if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true;
			 }
		 } for(int count=0;count<N;count++) {
				 if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true;
			 } int count=0; int count=0; count 0 count<N count N count++ count++ count {
				 if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true;
			 } {
				 if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true;
			 } if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true; A[i][count]==0 A[i][count] A[i] A i count 0 {} if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true; student[A[i][count]-1]==false student[A[i][count]-1] student A[i][count]-1 A[i][count] A[i] A i count 1 false student[A[i][count]-1]=true student[A[i][count]-1] student A[i][count]-1 A[i][count] A[i] A i count 1 true int num=0; num 0 for(int i=0;i<N;i++) {
			 if(student[i]==false)
				 num++;
		 } int i=0; int i=0; i 0 i<N i N i++ i++ i {
			 if(student[i]==false)
				 num++;
		 } {
			 if(student[i]==false)
				 num++;
		 } if(student[i]==false)
				 num++; student[i]==false student[i] student i false num++ num System.out.println(num) System.out.println System.out System System.out num sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args){
		 Scanner sc = new Scanner(System.in);
		 int N=sc.nextInt();
		 int K=sc.nextInt();
		 int d[]=new int[K];
		 int A[][]=new int[K][N];
		 for(int i=0;i<K;i++) {
			 d[i]=sc.nextInt();
			 for(int count=0;count<d[i];count++) {
				 A[i][count]=sc.nextInt();
			 }
		 }
		 boolean student[]=new boolean[N];
		 for(int i=0;i<N;i++)
			 student[i]=false;
		 for(int i=0;i<K;i++) {
			 for(int count=0;count<N;count++) {
				 if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true;
			 }
		 }
		 int num=0;
		 for(int i=0;i<N;i++) {
			 if(student[i]==false)
				 num++;
		 }
	     System.out.println(num);
	     sc.close();
	 }
} public class Main {
	public static void main(String[] args){
		 Scanner sc = new Scanner(System.in);
		 int N=sc.nextInt();
		 int K=sc.nextInt();
		 int d[]=new int[K];
		 int A[][]=new int[K][N];
		 for(int i=0;i<K;i++) {
			 d[i]=sc.nextInt();
			 for(int count=0;count<d[i];count++) {
				 A[i][count]=sc.nextInt();
			 }
		 }
		 boolean student[]=new boolean[N];
		 for(int i=0;i<N;i++)
			 student[i]=false;
		 for(int i=0;i<K;i++) {
			 for(int count=0;count<N;count++) {
				 if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true;
			 }
		 }
		 int num=0;
		 for(int i=0;i<N;i++) {
			 if(student[i]==false)
				 num++;
		 }
	     System.out.println(num);
	     sc.close();
	 }
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		 Scanner sc = new Scanner(System.in);
		 int N=sc.nextInt();
		 int K=sc.nextInt();
		 int d[]=new int[K];
		 int A[][]=new int[K][N];
		 for(int i=0;i<K;i++) {
			 d[i]=sc.nextInt();
			 for(int count=0;count<d[i];count++) {
				 A[i][count]=sc.nextInt();
			 }
		 }
		 boolean student[]=new boolean[N];
		 for(int i=0;i<N;i++)
			 student[i]=false;
		 for(int i=0;i<K;i++) {
			 for(int count=0;count<N;count++) {
				 if(A[i][count]==0) {}
				 else if(student[A[i][count]-1]==false) 
						student[A[i][count]-1]=true;
			 }
		 }
		 int num=0;
		 for(int i=0;i<N;i++) {
			 if(student[i]==false)
				 num++;
		 }
	     System.out.println(num);
	     sc.close();
	 }
}