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 A = 0;
		int cost1 = 0;
		int cost2 = 0;
		
		for(int i = 1; i < M + 1; i++) {
			A = sc.nextInt();
			if(A < X) {
				cost1++;
			} else {
				cost2++;
			}
		}
		
		System.out.println(Math.min(cost1, cost2));
		
	}
} 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 A = 0;
		int cost1 = 0;
		int cost2 = 0;
		
		for(int i = 1; i < M + 1; i++) {
			A = sc.nextInt();
			if(A < X) {
				cost1++;
			} else {
				cost2++;
			}
		}
		
		System.out.println(Math.min(cost1, cost2));
		
	}
} 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 A = 0;
		int cost1 = 0;
		int cost2 = 0;
		
		for(int i = 1; i < M + 1; i++) {
			A = sc.nextInt();
			if(A < X) {
				cost1++;
			} else {
				cost2++;
			}
		}
		
		System.out.println(Math.min(cost1, cost2));
		
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int X = sc.nextInt();
		
		int A = 0;
		int cost1 = 0;
		int cost2 = 0;
		
		for(int i = 1; i < M + 1; i++) {
			A = sc.nextInt();
			if(A < X) {
				cost1++;
			} else {
				cost2++;
			}
		}
		
		System.out.println(Math.min(cost1, cost2));
		
	} 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 A = 0; A 0 int cost1 = 0; cost1 0 int cost2 = 0; cost2 0 for(int i = 1; i < M + 1; i++) {
			A = sc.nextInt();
			if(A < X) {
				cost1++;
			} else {
				cost2++;
			}
		} int i = 1; int i = 1; i 1 i < M + 1 i M + 1 M 1 i++ i++ i {
			A = sc.nextInt();
			if(A < X) {
				cost1++;
			} else {
				cost2++;
			}
		} {
			A = sc.nextInt();
			if(A < X) {
				cost1++;
			} else {
				cost2++;
			}
		} A = sc.nextInt() A sc.nextInt() sc.nextInt sc if(A < X) {
				cost1++;
			} else {
				cost2++;
			} A < X A X {
				cost1++;
			} cost1++ cost1 {
				cost2++;
			} 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 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 A = 0;
		int cost1 = 0;
		int cost2 = 0;
		
		for(int i = 1; i < M + 1; i++) {
			A = sc.nextInt();
			if(A < X) {
				cost1++;
			} else {
				cost2++;
			}
		}
		
		System.out.println(Math.min(cost1, cost2));
		
	}
} 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 A = 0;
		int cost1 = 0;
		int cost2 = 0;
		
		for(int i = 1; i < M + 1; i++) {
			A = sc.nextInt();
			if(A < X) {
				cost1++;
			} else {
				cost2++;
			}
		}
		
		System.out.println(Math.min(cost1, cost2));
		
	}
} 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 A = 0;
		int cost1 = 0;
		int cost2 = 0;
		
		for(int i = 1; i < M + 1; i++) {
			A = sc.nextInt();
			if(A < X) {
				cost1++;
			} else {
				cost2++;
			}
		}
		
		System.out.println(Math.min(cost1, cost2));
		
	}
}
