import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int X = sc.nextInt();
		int big = 0;
		int small = 0;
		for(int i = 0;i<M;i++){
			if(X>sc.nextInt()){
				small++;
			}else{
				big++;
			}
		}
		if(big>small){
			System.out.println(small);
		}else{
			System.out.println(big);
		}
	}

} 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 M = sc.nextInt();
		int X = sc.nextInt();
		int big = 0;
		int small = 0;
		for(int i = 0;i<M;i++){
			if(X>sc.nextInt()){
				small++;
			}else{
				big++;
			}
		}
		if(big>small){
			System.out.println(small);
		}else{
			System.out.println(big);
		}
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int X = sc.nextInt();
		int big = 0;
		int small = 0;
		for(int i = 0;i<M;i++){
			if(X>sc.nextInt()){
				small++;
			}else{
				big++;
			}
		}
		if(big>small){
			System.out.println(small);
		}else{
			System.out.println(big);
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int X = sc.nextInt();
		int big = 0;
		int small = 0;
		for(int i = 0;i<M;i++){
			if(X>sc.nextInt()){
				small++;
			}else{
				big++;
			}
		}
		if(big>small){
			System.out.println(small);
		}else{
			System.out.println(big);
		}
	}

} 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 M = sc.nextInt();
		int X = sc.nextInt();
		int big = 0;
		int small = 0;
		for(int i = 0;i<M;i++){
			if(X>sc.nextInt()){
				small++;
			}else{
				big++;
			}
		}
		if(big>small){
			System.out.println(small);
		}else{
			System.out.println(big);
		}
	}

}
