import 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 total0 = 0;
		int totalN = 0;
		for (int i = 0; i < m; i++) {
			int z = sc.nextInt();
			if (z < x) {
				total0++;
			} else {
				totalN++;
			}
		}
		if (total0 < totalN) {
			System.out.println(total0);
		} else {
			System.out.println(totalN);
		}
	}
} import java.util.*; util.* java 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 total0 = 0;
		int totalN = 0;
		for (int i = 0; i < m; i++) {
			int z = sc.nextInt();
			if (z < x) {
				total0++;
			} else {
				totalN++;
			}
		}
		if (total0 < totalN) {
			System.out.println(total0);
		} else {
			System.out.println(totalN);
		}
	}
} 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 total0 = 0;
		int totalN = 0;
		for (int i = 0; i < m; i++) {
			int z = sc.nextInt();
			if (z < x) {
				total0++;
			} else {
				totalN++;
			}
		}
		if (total0 < totalN) {
			System.out.println(total0);
		} else {
			System.out.println(totalN);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int x = sc.nextInt();
		int total0 = 0;
		int totalN = 0;
		for (int i = 0; i < m; i++) {
			int z = sc.nextInt();
			if (z < x) {
				total0++;
			} else {
				totalN++;
			}
		}
		if (total0 < totalN) {
			System.out.println(total0);
		} else {
			System.out.println(totalN);
		}
	} 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 total0 = 0; total0 0 int totalN = 0; totalN 0 for (int i = 0; i < m; i++) {
			int z = sc.nextInt();
			if (z < x) {
				total0++;
			} else {
				totalN++;
			}
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			int z = sc.nextInt();
			if (z < x) {
				total0++;
			} else {
				totalN++;
			}
		} {
			int z = sc.nextInt();
			if (z < x) {
				total0++;
			} else {
				totalN++;
			}
		} int z = sc.nextInt(); z sc.nextInt() sc.nextInt sc if (z < x) {
				total0++;
			} else {
				totalN++;
			} z < x z x {
				total0++;
			} total0++ total0 {
				totalN++;
			} totalN++ totalN if (total0 < totalN) {
			System.out.println(total0);
		} else {
			System.out.println(totalN);
		} total0 < totalN total0 totalN {
			System.out.println(total0);
		} System.out.println(total0) System.out.println System.out System System.out total0 {
			System.out.println(totalN);
		} System.out.println(totalN) System.out.println System.out System System.out totalN 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 total0 = 0;
		int totalN = 0;
		for (int i = 0; i < m; i++) {
			int z = sc.nextInt();
			if (z < x) {
				total0++;
			} else {
				totalN++;
			}
		}
		if (total0 < totalN) {
			System.out.println(total0);
		} else {
			System.out.println(totalN);
		}
	}
} 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 total0 = 0;
		int totalN = 0;
		for (int i = 0; i < m; i++) {
			int z = sc.nextInt();
			if (z < x) {
				total0++;
			} else {
				totalN++;
			}
		}
		if (total0 < totalN) {
			System.out.println(total0);
		} else {
			System.out.println(totalN);
		}
	}
} Main
import 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 total0 = 0;
		int totalN = 0;
		for (int i = 0; i < m; i++) {
			int z = sc.nextInt();
			if (z < x) {
				total0++;
			} else {
				totalN++;
			}
		}
		if (total0 < totalN) {
			System.out.println(total0);
		} else {
			System.out.println(totalN);
		}
	}
}
