import java.util.Scanner;
public class Main{
    public static void main(String args[]){
        Scanner scan=new Scanner(System.in);
        int N=scan.nextInt();
        int M=scan.nextInt();
        int start=scan.nextInt();
        int[] A=new int[M];
        int i;
        int count1=0;
        int count2=0;
        for(i=0;i<M;i++){
            A[i]=scan.nextInt();
            if(A[i]<start){
                count1++;
            }
            else{
                count2++;
            }
        }
        if(count1<count2){
            System.out.println(count1);
        }
        else{
            System.out.println(count2);
        }
        
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String args[]){
        Scanner scan=new Scanner(System.in);
        int N=scan.nextInt();
        int M=scan.nextInt();
        int start=scan.nextInt();
        int[] A=new int[M];
        int i;
        int count1=0;
        int count2=0;
        for(i=0;i<M;i++){
            A[i]=scan.nextInt();
            if(A[i]<start){
                count1++;
            }
            else{
                count2++;
            }
        }
        if(count1<count2){
            System.out.println(count1);
        }
        else{
            System.out.println(count2);
        }
        
    }
} Main public static void main(String args[]){
        Scanner scan=new Scanner(System.in);
        int N=scan.nextInt();
        int M=scan.nextInt();
        int start=scan.nextInt();
        int[] A=new int[M];
        int i;
        int count1=0;
        int count2=0;
        for(i=0;i<M;i++){
            A[i]=scan.nextInt();
            if(A[i]<start){
                count1++;
            }
            else{
                count2++;
            }
        }
        if(count1<count2){
            System.out.println(count1);
        }
        else{
            System.out.println(count2);
        }
        
    } main {
        Scanner scan=new Scanner(System.in);
        int N=scan.nextInt();
        int M=scan.nextInt();
        int start=scan.nextInt();
        int[] A=new int[M];
        int i;
        int count1=0;
        int count2=0;
        for(i=0;i<M;i++){
            A[i]=scan.nextInt();
            if(A[i]<start){
                count1++;
            }
            else{
                count2++;
            }
        }
        if(count1<count2){
            System.out.println(count1);
        }
        else{
            System.out.println(count2);
        }
        
    } Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int N=scan.nextInt(); N scan.nextInt() scan.nextInt scan int M=scan.nextInt(); M scan.nextInt() scan.nextInt scan int start=scan.nextInt(); start scan.nextInt() scan.nextInt scan int[] A=new int[M]; A new int[M] M int i; i int count1=0; count1 0 int count2=0; count2 0 for(i=0;i<M;i++){
            A[i]=scan.nextInt();
            if(A[i]<start){
                count1++;
            }
            else{
                count2++;
            }
        } i=0; i=0 i 0 i<M i M i++ i++ i {
            A[i]=scan.nextInt();
            if(A[i]<start){
                count1++;
            }
            else{
                count2++;
            }
        } {
            A[i]=scan.nextInt();
            if(A[i]<start){
                count1++;
            }
            else{
                count2++;
            }
        } A[i]=scan.nextInt() A[i] A i scan.nextInt() scan.nextInt scan if(A[i]<start){
                count1++;
            }
            else{
                count2++;
            } A[i]<start A[i] A i start {
                count1++;
            } count1++ count1 {
                count2++;
            } count2++ count2 if(count1<count2){
            System.out.println(count1);
        }
        else{
            System.out.println(count2);
        } count1<count2 count1 count2 {
            System.out.println(count1);
        } System.out.println(count1) System.out.println System.out System System.out count1 {
            System.out.println(count2);
        } System.out.println(count2) System.out.println System.out System System.out count2 String args[] args public class Main{
    public static void main(String args[]){
        Scanner scan=new Scanner(System.in);
        int N=scan.nextInt();
        int M=scan.nextInt();
        int start=scan.nextInt();
        int[] A=new int[M];
        int i;
        int count1=0;
        int count2=0;
        for(i=0;i<M;i++){
            A[i]=scan.nextInt();
            if(A[i]<start){
                count1++;
            }
            else{
                count2++;
            }
        }
        if(count1<count2){
            System.out.println(count1);
        }
        else{
            System.out.println(count2);
        }
        
    }
} public class Main{
    public static void main(String args[]){
        Scanner scan=new Scanner(System.in);
        int N=scan.nextInt();
        int M=scan.nextInt();
        int start=scan.nextInt();
        int[] A=new int[M];
        int i;
        int count1=0;
        int count2=0;
        for(i=0;i<M;i++){
            A[i]=scan.nextInt();
            if(A[i]<start){
                count1++;
            }
            else{
                count2++;
            }
        }
        if(count1<count2){
            System.out.println(count1);
        }
        else{
            System.out.println(count2);
        }
        
    }
} Main
import java.util.Scanner;
public class Main{
    public static void main(String args[]){
        Scanner scan=new Scanner(System.in);
        int N=scan.nextInt();
        int M=scan.nextInt();
        int start=scan.nextInt();
        int[] A=new int[M];
        int i;
        int count1=0;
        int count2=0;
        for(i=0;i<M;i++){
            A[i]=scan.nextInt();
            if(A[i]<start){
                count1++;
            }
            else{
                count2++;
            }
        }
        if(count1<count2){
            System.out.println(count1);
        }
        else{
            System.out.println(count2);
        }
        
    }
}