import java.util.Scanner;
/**
 * 2018-04-14
 * https://beta.atcoder.jp/contests/abc094/tasks/abc094_b
 */
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 chargeZero =0;
        int chargeN=0;

        for (int n = 0; n < A.length ; n++){
            if(A[n]<X){
                chargeZero++;
            }else{
                chargeN++;
            }
        }

        System.out.println(Math.min(chargeZero,chargeN));


    }
} 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 chargeZero =0;
        int chargeN=0;

        for (int n = 0; n < A.length ; n++){
            if(A[n]<X){
                chargeZero++;
            }else{
                chargeN++;
            }
        }

        System.out.println(Math.min(chargeZero,chargeN));


    }
} 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 chargeZero =0;
        int chargeN=0;

        for (int n = 0; n < A.length ; n++){
            if(A[n]<X){
                chargeZero++;
            }else{
                chargeN++;
            }
        }

        System.out.println(Math.min(chargeZero,chargeN));


    } 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 chargeZero =0;
        int chargeN=0;

        for (int n = 0; n < A.length ; n++){
            if(A[n]<X){
                chargeZero++;
            }else{
                chargeN++;
            }
        }

        System.out.println(Math.min(chargeZero,chargeN));


    } 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 chargeZero =0; chargeZero 0 int chargeN=0; chargeN 0 for (int n = 0; n < A.length ; n++){
            if(A[n]<X){
                chargeZero++;
            }else{
                chargeN++;
            }
        } int n = 0; int n = 0; n 0 n < A.length n A.length A A.length n++ n++ n {
            if(A[n]<X){
                chargeZero++;
            }else{
                chargeN++;
            }
        } {
            if(A[n]<X){
                chargeZero++;
            }else{
                chargeN++;
            }
        } if(A[n]<X){
                chargeZero++;
            }else{
                chargeN++;
            } A[n]<X A[n] A n X {
                chargeZero++;
            } chargeZero++ chargeZero {
                chargeN++;
            } chargeN++ chargeN System.out.println(Math.min(chargeZero,chargeN)) System.out.println System.out System System.out Math.min(chargeZero,chargeN) Math.min Math chargeZero chargeN 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 chargeZero =0;
        int chargeN=0;

        for (int n = 0; n < A.length ; n++){
            if(A[n]<X){
                chargeZero++;
            }else{
                chargeN++;
            }
        }

        System.out.println(Math.min(chargeZero,chargeN));


    }
} 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 chargeZero =0;
        int chargeN=0;

        for (int n = 0; n < A.length ; n++){
            if(A[n]<X){
                chargeZero++;
            }else{
                chargeN++;
            }
        }

        System.out.println(Math.min(chargeZero,chargeN));


    }
} Main
import java.util.Scanner;
/**
 * 2018-04-14
 * https://beta.atcoder.jp/contests/abc094/tasks/abc094_b
 */
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 chargeZero =0;
        int chargeN=0;

        for (int n = 0; n < A.length ; n++){
            if(A[n]<X){
                chargeZero++;
            }else{
                chargeN++;
            }
        }

        System.out.println(Math.min(chargeZero,chargeN));


    }
}
