import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int cost0 = 0, costN = 0, Ai;

		for (int i = 0; i < M; i++) {
			Ai = Integer.parseInt(sc.next());
			if (Ai < X) {
				cost0++;
			} else {
				costN++;
			}
		}

		if (cost0 < costN) {
			System.out.println(cost0);
		} else {
			System.out.println(costN);
		}

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int cost0 = 0, costN = 0, Ai;

		for (int i = 0; i < M; i++) {
			Ai = Integer.parseInt(sc.next());
			if (Ai < X) {
				cost0++;
			} else {
				costN++;
			}
		}

		if (cost0 < costN) {
			System.out.println(cost0);
		} else {
			System.out.println(costN);
		}

	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int cost0 = 0, costN = 0, Ai;

		for (int i = 0; i < M; i++) {
			Ai = Integer.parseInt(sc.next());
			if (Ai < X) {
				cost0++;
			} else {
				costN++;
			}
		}

		if (cost0 < costN) {
			System.out.println(cost0);
		} else {
			System.out.println(costN);
		}

	} main {

		Scanner sc = new Scanner(System.in);

		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int cost0 = 0, costN = 0, Ai;

		for (int i = 0; i < M; i++) {
			Ai = Integer.parseInt(sc.next());
			if (Ai < X) {
				cost0++;
			} else {
				costN++;
			}
		}

		if (cost0 < costN) {
			System.out.println(cost0);
		} else {
			System.out.println(costN);
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int M = Integer.parseInt(sc.next()); M Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int X = Integer.parseInt(sc.next()); X Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int cost0 = 0 cost0 0 costN = 0 costN 0 Ai; Ai for (int i = 0; i < M; i++) {
			Ai = Integer.parseInt(sc.next());
			if (Ai < X) {
				cost0++;
			} else {
				costN++;
			}
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			Ai = Integer.parseInt(sc.next());
			if (Ai < X) {
				cost0++;
			} else {
				costN++;
			}
		} {
			Ai = Integer.parseInt(sc.next());
			if (Ai < X) {
				cost0++;
			} else {
				costN++;
			}
		} Ai = Integer.parseInt(sc.next()) Ai Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if (Ai < X) {
				cost0++;
			} else {
				costN++;
			} Ai < X Ai X {
				cost0++;
			} cost0++ cost0 {
				costN++;
			} costN++ costN if (cost0 < costN) {
			System.out.println(cost0);
		} else {
			System.out.println(costN);
		} cost0 < costN cost0 costN {
			System.out.println(cost0);
		} System.out.println(cost0) System.out.println System.out System System.out cost0 {
			System.out.println(costN);
		} System.out.println(costN) System.out.println System.out System System.out costN String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int cost0 = 0, costN = 0, Ai;

		for (int i = 0; i < M; i++) {
			Ai = Integer.parseInt(sc.next());
			if (Ai < X) {
				cost0++;
			} else {
				costN++;
			}
		}

		if (cost0 < costN) {
			System.out.println(cost0);
		} else {
			System.out.println(costN);
		}

	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int cost0 = 0, costN = 0, Ai;

		for (int i = 0; i < M; i++) {
			Ai = Integer.parseInt(sc.next());
			if (Ai < X) {
				cost0++;
			} else {
				costN++;
			}
		}

		if (cost0 < costN) {
			System.out.println(cost0);
		} else {
			System.out.println(costN);
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());

		int cost0 = 0, costN = 0, Ai;

		for (int i = 0; i < M; i++) {
			Ai = Integer.parseInt(sc.next());
			if (Ai < X) {
				cost0++;
			} else {
				costN++;
			}
		}

		if (cost0 < costN) {
			System.out.println(cost0);
		} else {
			System.out.println(costN);
		}

	}

}