import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt(),M=sc.nextInt(),X=sc.nextInt();
		int[] A=new int[M];
		int cstL=0,cstR=0;
		for(int i=0;i<M;i++){
			A[i]=sc.nextInt();
			if(A[i]<X){
				cstL=cstL+1;
			}else{
				cstR=cstR+1;
			}
		}
		int cst=cstL;
		if(cst>cstR){
			cst=cstR;
		}
		System.out.println(cst);
	}
} 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(),M=sc.nextInt(),X=sc.nextInt();
		int[] A=new int[M];
		int cstL=0,cstR=0;
		for(int i=0;i<M;i++){
			A[i]=sc.nextInt();
			if(A[i]<X){
				cstL=cstL+1;
			}else{
				cstR=cstR+1;
			}
		}
		int cst=cstL;
		if(cst>cstR){
			cst=cstR;
		}
		System.out.println(cst);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt(),M=sc.nextInt(),X=sc.nextInt();
		int[] A=new int[M];
		int cstL=0,cstR=0;
		for(int i=0;i<M;i++){
			A[i]=sc.nextInt();
			if(A[i]<X){
				cstL=cstL+1;
			}else{
				cstR=cstR+1;
			}
		}
		int cst=cstL;
		if(cst>cstR){
			cst=cstR;
		}
		System.out.println(cst);
	} main {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt(),M=sc.nextInt(),X=sc.nextInt();
		int[] A=new int[M];
		int cstL=0,cstR=0;
		for(int i=0;i<M;i++){
			A[i]=sc.nextInt();
			if(A[i]<X){
				cstL=cstL+1;
			}else{
				cstR=cstR+1;
			}
		}
		int cst=cstL;
		if(cst>cstR){
			cst=cstR;
		}
		System.out.println(cst);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N=sc.nextInt() N sc.nextInt() sc.nextInt sc M=sc.nextInt() M sc.nextInt() sc.nextInt sc X=sc.nextInt(); X sc.nextInt() sc.nextInt sc int[] A=new int[M]; A new int[M] M int cstL=0 cstL 0 cstR=0; cstR 0 for(int i=0;i<M;i++){
			A[i]=sc.nextInt();
			if(A[i]<X){
				cstL=cstL+1;
			}else{
				cstR=cstR+1;
			}
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			A[i]=sc.nextInt();
			if(A[i]<X){
				cstL=cstL+1;
			}else{
				cstR=cstR+1;
			}
		} {
			A[i]=sc.nextInt();
			if(A[i]<X){
				cstL=cstL+1;
			}else{
				cstR=cstR+1;
			}
		} A[i]=sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc if(A[i]<X){
				cstL=cstL+1;
			}else{
				cstR=cstR+1;
			} A[i]<X A[i] A i X {
				cstL=cstL+1;
			} cstL=cstL+1 cstL cstL+1 cstL 1 {
				cstR=cstR+1;
			} cstR=cstR+1 cstR cstR+1 cstR 1 int cst=cstL; cst cstL if(cst>cstR){
			cst=cstR;
		} cst>cstR cst cstR {
			cst=cstR;
		} cst=cstR cst cstR System.out.println(cst) System.out.println System.out System System.out cst String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt(),M=sc.nextInt(),X=sc.nextInt();
		int[] A=new int[M];
		int cstL=0,cstR=0;
		for(int i=0;i<M;i++){
			A[i]=sc.nextInt();
			if(A[i]<X){
				cstL=cstL+1;
			}else{
				cstR=cstR+1;
			}
		}
		int cst=cstL;
		if(cst>cstR){
			cst=cstR;
		}
		System.out.println(cst);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt(),M=sc.nextInt(),X=sc.nextInt();
		int[] A=new int[M];
		int cstL=0,cstR=0;
		for(int i=0;i<M;i++){
			A[i]=sc.nextInt();
			if(A[i]<X){
				cstL=cstL+1;
			}else{
				cstR=cstR+1;
			}
		}
		int cst=cstL;
		if(cst>cstR){
			cst=cstR;
		}
		System.out.println(cst);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt(),M=sc.nextInt(),X=sc.nextInt();
		int[] A=new int[M];
		int cstL=0,cstR=0;
		for(int i=0;i<M;i++){
			A[i]=sc.nextInt();
			if(A[i]<X){
				cstL=cstL+1;
			}else{
				cstR=cstR+1;
			}
		}
		int cst=cstL;
		if(cst>cstR){
			cst=cstR;
		}
		System.out.println(cst);
	}
}
