import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.List;
import java.util.Scanner;

public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int M = sc.nextInt();
		int X = sc.nextInt();
		int sum_l = 0;
		int sum_r = 0;
		for(int i = 0; i < M; i++){
			int A = sc.nextInt();
			if(A < X) sum_l++;
			else sum_r++;
		}
		System.out.println(Math.min(sum_l, sum_r));
	}
} import java.io.File; File java.io import java.io.IOException; IOException java.io import java.util.ArrayDeque; ArrayDeque java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util import java.util.Deque; Deque java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int M = sc.nextInt();
		int X = sc.nextInt();
		int sum_l = 0;
		int sum_r = 0;
		for(int i = 0; i < M; i++){
			int A = sc.nextInt();
			if(A < X) sum_l++;
			else sum_r++;
		}
		System.out.println(Math.min(sum_l, sum_r));
	}
} Main public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int M = sc.nextInt();
		int X = sc.nextInt();
		int sum_l = 0;
		int sum_r = 0;
		for(int i = 0; i < M; i++){
			int A = sc.nextInt();
			if(A < X) sum_l++;
			else sum_r++;
		}
		System.out.println(Math.min(sum_l, sum_r));
	} main {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int M = sc.nextInt();
		int X = sc.nextInt();
		int sum_l = 0;
		int sum_r = 0;
		for(int i = 0; i < M; i++){
			int A = sc.nextInt();
			if(A < X) sum_l++;
			else sum_r++;
		}
		System.out.println(Math.min(sum_l, sum_r));
	} 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 sum_l = 0; sum_l 0 int sum_r = 0; sum_r 0 for(int i = 0; i < M; i++){
			int A = sc.nextInt();
			if(A < X) sum_l++;
			else sum_r++;
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			int A = sc.nextInt();
			if(A < X) sum_l++;
			else sum_r++;
		} {
			int A = sc.nextInt();
			if(A < X) sum_l++;
			else sum_r++;
		} int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc if(A < X) sum_l++;
			else sum_r++; A < X A X sum_l++ sum_l sum_r++ sum_r System.out.println(Math.min(sum_l, sum_r)) System.out.println System.out System System.out Math.min(sum_l, sum_r) Math.min Math sum_l sum_r String[] args args public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int M = sc.nextInt();
		int X = sc.nextInt();
		int sum_l = 0;
		int sum_r = 0;
		for(int i = 0; i < M; i++){
			int A = sc.nextInt();
			if(A < X) sum_l++;
			else sum_r++;
		}
		System.out.println(Math.min(sum_l, sum_r));
	}
} public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int M = sc.nextInt();
		int X = sc.nextInt();
		int sum_l = 0;
		int sum_r = 0;
		for(int i = 0; i < M; i++){
			int A = sc.nextInt();
			if(A < X) sum_l++;
			else sum_r++;
		}
		System.out.println(Math.min(sum_l, sum_r));
	}
} Main
import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.List;
import java.util.Scanner;

public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int M = sc.nextInt();
		int X = sc.nextInt();
		int sum_l = 0;
		int sum_r = 0;
		for(int i = 0; i < M; i++){
			int A = sc.nextInt();
			if(A < X) sum_l++;
			else sum_r++;
		}
		System.out.println(Math.min(sum_l, sum_r));
	}
}