import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), x = sc.nextInt();
		int a[] = new int[m];
		int tmp = 0, tmp2 = 0;
		for(int i = 0; i < m; ++i) {
			a[i] = sc.nextInt();
			if(a[i] < x)++tmp;
			else ++tmp2;
		}
		sc.close();
		int ans = 0;
		ans = Math.min(tmp, tmp2);
		System.out.println(ans);
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), x = sc.nextInt();
		int a[] = new int[m];
		int tmp = 0, tmp2 = 0;
		for(int i = 0; i < m; ++i) {
			a[i] = sc.nextInt();
			if(a[i] < x)++tmp;
			else ++tmp2;
		}
		sc.close();
		int ans = 0;
		ans = Math.min(tmp, tmp2);
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), x = sc.nextInt();
		int a[] = new int[m];
		int tmp = 0, tmp2 = 0;
		for(int i = 0; i < m; ++i) {
			a[i] = sc.nextInt();
			if(a[i] < x)++tmp;
			else ++tmp2;
		}
		sc.close();
		int ans = 0;
		ans = Math.min(tmp, tmp2);
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), x = sc.nextInt();
		int a[] = new int[m];
		int tmp = 0, tmp2 = 0;
		for(int i = 0; i < m; ++i) {
			a[i] = sc.nextInt();
			if(a[i] < x)++tmp;
			else ++tmp2;
		}
		sc.close();
		int ans = 0;
		ans = Math.min(tmp, tmp2);
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt() n sc.nextInt() sc.nextInt sc m = sc.nextInt() m sc.nextInt() sc.nextInt sc x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int a[] = new int[m]; a new int[m] m int tmp = 0 tmp 0 tmp2 = 0; tmp2 0 for(int i = 0; i < m; ++i) {
			a[i] = sc.nextInt();
			if(a[i] < x)++tmp;
			else ++tmp2;
		} int i = 0; int i = 0; i 0 i < m i m ++i ++i i {
			a[i] = sc.nextInt();
			if(a[i] < x)++tmp;
			else ++tmp2;
		} {
			a[i] = sc.nextInt();
			if(a[i] < x)++tmp;
			else ++tmp2;
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc if(a[i] < x)++tmp;
			else ++tmp2; a[i] < x a[i] a i x ++tmp tmp ++tmp2 tmp2 sc.close() sc.close sc int ans = 0; ans 0 ans = Math.min(tmp, tmp2) ans Math.min(tmp, tmp2) Math.min Math tmp tmp2 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), x = sc.nextInt();
		int a[] = new int[m];
		int tmp = 0, tmp2 = 0;
		for(int i = 0; i < m; ++i) {
			a[i] = sc.nextInt();
			if(a[i] < x)++tmp;
			else ++tmp2;
		}
		sc.close();
		int ans = 0;
		ans = Math.min(tmp, tmp2);
		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), x = sc.nextInt();
		int a[] = new int[m];
		int tmp = 0, tmp2 = 0;
		for(int i = 0; i < m; ++i) {
			a[i] = sc.nextInt();
			if(a[i] < x)++tmp;
			else ++tmp2;
		}
		sc.close();
		int ans = 0;
		ans = Math.min(tmp, tmp2);
		System.out.println(ans);
	}

} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), m = sc.nextInt(), x = sc.nextInt();
		int a[] = new int[m];
		int tmp = 0, tmp2 = 0;
		for(int i = 0; i < m; ++i) {
			a[i] = sc.nextInt();
			if(a[i] < x)++tmp;
			else ++tmp2;
		}
		sc.close();
		int ans = 0;
		ans = Math.min(tmp, tmp2);
		System.out.println(ans);
	}

}
