import 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 down=0;
        int up=0;
        for(int i=1;i<m+1;i++){
           if(sc.nextInt()>x) up++;
           else down++;
        }
        if(down<up) System.out.println(down);
        else System.out.println(up);

        
        

    }
} import java.util.*; util.* java 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 down=0;
        int up=0;
        for(int i=1;i<m+1;i++){
           if(sc.nextInt()>x) up++;
           else down++;
        }
        if(down<up) System.out.println(down);
        else System.out.println(up);

        
        

    }
} 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 down=0;
        int up=0;
        for(int i=1;i<m+1;i++){
           if(sc.nextInt()>x) up++;
           else down++;
        }
        if(down<up) System.out.println(down);
        else System.out.println(up);

        
        

    } main {
        Scanner sc=new Scanner (System.in);
        //ますの数
        int n=sc.nextInt();
        //料金所の数
        int m=sc.nextInt();
        int x=sc.nextInt();
        int down=0;
        int up=0;
        for(int i=1;i<m+1;i++){
           if(sc.nextInt()>x) up++;
           else down++;
        }
        if(down<up) System.out.println(down);
        else System.out.println(up);

        
        

    } 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 down=0; down 0 int up=0; up 0 for(int i=1;i<m+1;i++){
           if(sc.nextInt()>x) up++;
           else down++;
        } int i=1; int i=1; i 1 i<m+1 i m+1 m 1 i++ i++ i {
           if(sc.nextInt()>x) up++;
           else down++;
        } {
           if(sc.nextInt()>x) up++;
           else down++;
        } if(sc.nextInt()>x) up++;
           else down++; sc.nextInt()>x sc.nextInt() sc.nextInt sc x up++ up down++ down if(down<up) System.out.println(down);
        else System.out.println(up); down<up down up System.out.println(down) System.out.println System.out System System.out down System.out.println(up) System.out.println System.out System System.out up 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 down=0;
        int up=0;
        for(int i=1;i<m+1;i++){
           if(sc.nextInt()>x) up++;
           else down++;
        }
        if(down<up) System.out.println(down);
        else System.out.println(up);

        
        

    }
} 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 down=0;
        int up=0;
        for(int i=1;i<m+1;i++){
           if(sc.nextInt()>x) up++;
           else down++;
        }
        if(down<up) System.out.println(down);
        else System.out.println(up);

        
        

    }
} Main
import 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 down=0;
        int up=0;
        for(int i=1;i<m+1;i++){
           if(sc.nextInt()>x) up++;
           else down++;
        }
        if(down<up) System.out.println(down);
        else System.out.println(up);

        
        

    }
}