import java.util.Scanner;

class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String[] array = str.split(" ");
        int[] num =new int[3];
        for(int i=0;i<3;i++){
            num[i]=Integer.parseInt(array[i]);
        }
        String str2 = sc.nextLine();       
        String[] array2 = str2.split(" ");
        int[] num2 = new int[num[1]];
        for(int i=0;i<array2.length;i++){
            num2[i]=Integer.parseInt(array2[i]);
        }
        int low=0;
        int high=0;
        for(int i=0;i<array2.length;i++){
            if(num2[i]<num[2]){
                low++;
            }else{
                high++;
            }
        }
        int min=Math.min(low, high);
        System.out.println(min);
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String[] array = str.split(" ");
        int[] num =new int[3];
        for(int i=0;i<3;i++){
            num[i]=Integer.parseInt(array[i]);
        }
        String str2 = sc.nextLine();       
        String[] array2 = str2.split(" ");
        int[] num2 = new int[num[1]];
        for(int i=0;i<array2.length;i++){
            num2[i]=Integer.parseInt(array2[i]);
        }
        int low=0;
        int high=0;
        for(int i=0;i<array2.length;i++){
            if(num2[i]<num[2]){
                low++;
            }else{
                high++;
            }
        }
        int min=Math.min(low, high);
        System.out.println(min);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String[] array = str.split(" ");
        int[] num =new int[3];
        for(int i=0;i<3;i++){
            num[i]=Integer.parseInt(array[i]);
        }
        String str2 = sc.nextLine();       
        String[] array2 = str2.split(" ");
        int[] num2 = new int[num[1]];
        for(int i=0;i<array2.length;i++){
            num2[i]=Integer.parseInt(array2[i]);
        }
        int low=0;
        int high=0;
        for(int i=0;i<array2.length;i++){
            if(num2[i]<num[2]){
                low++;
            }else{
                high++;
            }
        }
        int min=Math.min(low, high);
        System.out.println(min);
    } main {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String[] array = str.split(" ");
        int[] num =new int[3];
        for(int i=0;i<3;i++){
            num[i]=Integer.parseInt(array[i]);
        }
        String str2 = sc.nextLine();       
        String[] array2 = str2.split(" ");
        int[] num2 = new int[num[1]];
        for(int i=0;i<array2.length;i++){
            num2[i]=Integer.parseInt(array2[i]);
        }
        int low=0;
        int high=0;
        for(int i=0;i<array2.length;i++){
            if(num2[i]<num[2]){
                low++;
            }else{
                high++;
            }
        }
        int min=Math.min(low, high);
        System.out.println(min);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc String[] array = str.split(" "); array str.split(" ") str.split str " " int[] num =new int[3]; num new int[3] 3 for(int i=0;i<3;i++){
            num[i]=Integer.parseInt(array[i]);
        } int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
            num[i]=Integer.parseInt(array[i]);
        } {
            num[i]=Integer.parseInt(array[i]);
        } num[i]=Integer.parseInt(array[i]) num[i] num i Integer.parseInt(array[i]) Integer.parseInt Integer array[i] array i String str2 = sc.nextLine(); str2 sc.nextLine() sc.nextLine sc String[] array2 = str2.split(" "); array2 str2.split(" ") str2.split str2 " " int[] num2 = new int[num[1]]; num2 new int[num[1]] num[1] num 1 for(int i=0;i<array2.length;i++){
            num2[i]=Integer.parseInt(array2[i]);
        } int i=0; int i=0; i 0 i<array2.length i array2.length array2 array2.length i++ i++ i {
            num2[i]=Integer.parseInt(array2[i]);
        } {
            num2[i]=Integer.parseInt(array2[i]);
        } num2[i]=Integer.parseInt(array2[i]) num2[i] num2 i Integer.parseInt(array2[i]) Integer.parseInt Integer array2[i] array2 i int low=0; low 0 int high=0; high 0 for(int i=0;i<array2.length;i++){
            if(num2[i]<num[2]){
                low++;
            }else{
                high++;
            }
        } int i=0; int i=0; i 0 i<array2.length i array2.length array2 array2.length i++ i++ i {
            if(num2[i]<num[2]){
                low++;
            }else{
                high++;
            }
        } {
            if(num2[i]<num[2]){
                low++;
            }else{
                high++;
            }
        } if(num2[i]<num[2]){
                low++;
            }else{
                high++;
            } num2[i]<num[2] num2[i] num2 i num[2] num 2 {
                low++;
            } low++ low {
                high++;
            } high++ high int min=Math.min(low, high); min Math.min(low, high) Math.min Math low high System.out.println(min) System.out.println System.out System System.out min String[] args args
import java.util.Scanner;

class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String[] array = str.split(" ");
        int[] num =new int[3];
        for(int i=0;i<3;i++){
            num[i]=Integer.parseInt(array[i]);
        }
        String str2 = sc.nextLine();       
        String[] array2 = str2.split(" ");
        int[] num2 = new int[num[1]];
        for(int i=0;i<array2.length;i++){
            num2[i]=Integer.parseInt(array2[i]);
        }
        int low=0;
        int high=0;
        for(int i=0;i<array2.length;i++){
            if(num2[i]<num[2]){
                low++;
            }else{
                high++;
            }
        }
        int min=Math.min(low, high);
        System.out.println(min);
    }
}