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 low = 0;
		int high = 0;
		for(int i = 0; i < m; i++) {
			int a = sc.nextInt();
			if(a < x) {
				low++;
			}
			else {
				high++;
			}
		}

		if(low < high) {
			System.out.println(low);
		}
		else {
			System.out.println(high);
		}
	}
} 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 low = 0;
		int high = 0;
		for(int i = 0; i < m; i++) {
			int a = sc.nextInt();
			if(a < x) {
				low++;
			}
			else {
				high++;
			}
		}

		if(low < high) {
			System.out.println(low);
		}
		else {
			System.out.println(high);
		}
	}
} 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 low = 0;
		int high = 0;
		for(int i = 0; i < m; i++) {
			int a = sc.nextInt();
			if(a < x) {
				low++;
			}
			else {
				high++;
			}
		}

		if(low < high) {
			System.out.println(low);
		}
		else {
			System.out.println(high);
		}
	} main {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int m = sc.nextInt();
		int x = sc.nextInt();

		int low = 0;
		int high = 0;
		for(int i = 0; i < m; i++) {
			int a = sc.nextInt();
			if(a < x) {
				low++;
			}
			else {
				high++;
			}
		}

		if(low < high) {
			System.out.println(low);
		}
		else {
			System.out.println(high);
		}
	} 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 low = 0; low 0 int high = 0; high 0 for(int i = 0; i < m; i++) {
			int a = sc.nextInt();
			if(a < x) {
				low++;
			}
			else {
				high++;
			}
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			int a = sc.nextInt();
			if(a < x) {
				low++;
			}
			else {
				high++;
			}
		} {
			int a = sc.nextInt();
			if(a < x) {
				low++;
			}
			else {
				high++;
			}
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc if(a < x) {
				low++;
			}
			else {
				high++;
			} a < x a x {
				low++;
			} low++ low {
				high++;
			} high++ high if(low < high) {
			System.out.println(low);
		}
		else {
			System.out.println(high);
		} low < high low high {
			System.out.println(low);
		} System.out.println(low) System.out.println System.out System System.out low {
			System.out.println(high);
		} System.out.println(high) System.out.println System.out System System.out high 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 low = 0;
		int high = 0;
		for(int i = 0; i < m; i++) {
			int a = sc.nextInt();
			if(a < x) {
				low++;
			}
			else {
				high++;
			}
		}

		if(low < high) {
			System.out.println(low);
		}
		else {
			System.out.println(high);
		}
	}
} 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 low = 0;
		int high = 0;
		for(int i = 0; i < m; i++) {
			int a = sc.nextInt();
			if(a < x) {
				low++;
			}
			else {
				high++;
			}
		}

		if(low < high) {
			System.out.println(low);
		}
		else {
			System.out.println(high);
		}
	}
} 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 low = 0;
		int high = 0;
		for(int i = 0; i < m; i++) {
			int a = sc.nextInt();
			if(a < x) {
				low++;
			}
			else {
				high++;
			}
		}

		if(low < high) {
			System.out.println(low);
		}
		else {
			System.out.println(high);
		}
	}
}
