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 = new int[M];

		for (int i = 0; i < M; i++) {
			A[i] = sc.nextInt();
		}
		int toZero = 0;
		int toN = 0;
		for (int a : A) {
			if (a > X) {
				toZero = toZero + 1;
			} else {
				toN = toN + 1;
			}
		}
		System.out.println(toZero > toN ? toN : toZero);

	}
} 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 = new int[M];

		for (int i = 0; i < M; i++) {
			A[i] = sc.nextInt();
		}
		int toZero = 0;
		int toN = 0;
		for (int a : A) {
			if (a > X) {
				toZero = toZero + 1;
			} else {
				toN = toN + 1;
			}
		}
		System.out.println(toZero > toN ? toN : toZero);

	}
} 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 = new int[M];

		for (int i = 0; i < M; i++) {
			A[i] = sc.nextInt();
		}
		int toZero = 0;
		int toN = 0;
		for (int a : A) {
			if (a > X) {
				toZero = toZero + 1;
			} else {
				toN = toN + 1;
			}
		}
		System.out.println(toZero > toN ? toN : toZero);

	} main {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int X = sc.nextInt();
		int[] A = new int[M];

		for (int i = 0; i < M; i++) {
			A[i] = sc.nextInt();
		}
		int toZero = 0;
		int toN = 0;
		for (int a : A) {
			if (a > X) {
				toZero = toZero + 1;
			} else {
				toN = toN + 1;
			}
		}
		System.out.println(toZero > toN ? toN : toZero);

	} 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 = new int[M]; A new int[M] M for (int i = 0; i < M; i++) {
			A[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			A[i] = sc.nextInt();
		} {
			A[i] = sc.nextInt();
		} A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc int toZero = 0; toZero 0 int toN = 0; toN 0 for (int a : A) {
			if (a > X) {
				toZero = toZero + 1;
			} else {
				toN = toN + 1;
			}
		} int a A {
			if (a > X) {
				toZero = toZero + 1;
			} else {
				toN = toN + 1;
			}
		} {
			if (a > X) {
				toZero = toZero + 1;
			} else {
				toN = toN + 1;
			}
		} if (a > X) {
				toZero = toZero + 1;
			} else {
				toN = toN + 1;
			} a > X a X {
				toZero = toZero + 1;
			} toZero = toZero + 1 toZero toZero + 1 toZero 1 {
				toN = toN + 1;
			} toN = toN + 1 toN toN + 1 toN 1 System.out.println(toZero > toN ? toN : toZero) System.out.println System.out System System.out toZero > toN ? toN : toZero toZero > toN toZero toN toN toZero 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 = new int[M];

		for (int i = 0; i < M; i++) {
			A[i] = sc.nextInt();
		}
		int toZero = 0;
		int toN = 0;
		for (int a : A) {
			if (a > X) {
				toZero = toZero + 1;
			} else {
				toN = toN + 1;
			}
		}
		System.out.println(toZero > toN ? toN : toZero);

	}
} 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 = new int[M];

		for (int i = 0; i < M; i++) {
			A[i] = sc.nextInt();
		}
		int toZero = 0;
		int toN = 0;
		for (int a : A) {
			if (a > X) {
				toZero = toZero + 1;
			} else {
				toN = toN + 1;
			}
		}
		System.out.println(toZero > toN ? toN : toZero);

	}
} 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 = new int[M];

		for (int i = 0; i < M; i++) {
			A[i] = sc.nextInt();
		}
		int toZero = 0;
		int toN = 0;
		for (int a : A) {
			if (a > X) {
				toZero = toZero + 1;
			} else {
				toN = toN + 1;
			}
		}
		System.out.println(toZero > toN ? toN : toZero);

	}
}
