import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int cost1 = 0; int cost2 = 0;
		int n = sc.nextInt();
		int m = sc.nextInt();
		int x = sc.nextInt();
		for(int i = 0; i < m; i++) {
			if(sc.nextInt() < x) cost1++;
			else cost2++;
		}
		System.out.println(Math.min(cost1, cost2));
		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 cost1 = 0; int cost2 = 0;
		int n = sc.nextInt();
		int m = sc.nextInt();
		int x = sc.nextInt();
		for(int i = 0; i < m; i++) {
			if(sc.nextInt() < x) cost1++;
			else cost2++;
		}
		System.out.println(Math.min(cost1, cost2));
		sc.close();
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int cost1 = 0; int cost2 = 0;
		int n = sc.nextInt();
		int m = sc.nextInt();
		int x = sc.nextInt();
		for(int i = 0; i < m; i++) {
			if(sc.nextInt() < x) cost1++;
			else cost2++;
		}
		System.out.println(Math.min(cost1, cost2));
		sc.close();
	} main {

		Scanner sc = new Scanner(System.in);
		int cost1 = 0; int cost2 = 0;
		int n = sc.nextInt();
		int m = sc.nextInt();
		int x = sc.nextInt();
		for(int i = 0; i < m; i++) {
			if(sc.nextInt() < x) cost1++;
			else cost2++;
		}
		System.out.println(Math.min(cost1, cost2));
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int cost1 = 0; cost1 0 int cost2 = 0; cost2 0 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 for(int i = 0; i < m; i++) {
			if(sc.nextInt() < x) cost1++;
			else cost2++;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			if(sc.nextInt() < x) cost1++;
			else cost2++;
		} {
			if(sc.nextInt() < x) cost1++;
			else cost2++;
		} if(sc.nextInt() < x) cost1++;
			else cost2++; sc.nextInt() < x sc.nextInt() sc.nextInt sc x cost1++ cost1 cost2++ cost2 System.out.println(Math.min(cost1, cost2)) System.out.println System.out System System.out Math.min(cost1, cost2) Math.min Math cost1 cost2 sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int cost1 = 0; int cost2 = 0;
		int n = sc.nextInt();
		int m = sc.nextInt();
		int x = sc.nextInt();
		for(int i = 0; i < m; i++) {
			if(sc.nextInt() < x) cost1++;
			else cost2++;
		}
		System.out.println(Math.min(cost1, cost2));
		sc.close();
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int cost1 = 0; int cost2 = 0;
		int n = sc.nextInt();
		int m = sc.nextInt();
		int x = sc.nextInt();
		for(int i = 0; i < m; i++) {
			if(sc.nextInt() < x) cost1++;
			else cost2++;
		}
		System.out.println(Math.min(cost1, cost2));
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int cost1 = 0; int cost2 = 0;
		int n = sc.nextInt();
		int m = sc.nextInt();
		int x = sc.nextInt();
		for(int i = 0; i < m; i++) {
			if(sc.nextInt() < x) cost1++;
			else cost2++;
		}
		System.out.println(Math.min(cost1, cost2));
		sc.close();
	}
}