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[] A = new int[M];
        int sum = 0;
        int sumr = 0;
        for(int i = 0; i < M; i++){
            A[i] = sc.nextInt();
            sum++;
            if(A[i] < X)
                sumr++;
        }
        sc.close();
        System.out.println(Math.min(sum-sumr, sumr));
   }
} 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[] A = new int[M];
        int sum = 0;
        int sumr = 0;
        for(int i = 0; i < M; i++){
            A[i] = sc.nextInt();
            sum++;
            if(A[i] < X)
                sumr++;
        }
        sc.close();
        System.out.println(Math.min(sum-sumr, sumr));
   }
} 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];
        int sum = 0;
        int sumr = 0;
        for(int i = 0; i < M; i++){
            A[i] = sc.nextInt();
            sum++;
            if(A[i] < X)
                sumr++;
        }
        sc.close();
        System.out.println(Math.min(sum-sumr, sumr));
   } main {
        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int M = sc.nextInt();
        int X = sc.nextInt();
        int[] A = new int[M];
        int sum = 0;
        int sumr = 0;
        for(int i = 0; i < M; i++){
            A[i] = sc.nextInt();
            sum++;
            if(A[i] < X)
                sumr++;
        }
        sc.close();
        System.out.println(Math.min(sum-sumr, sumr));
   } 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 int sum = 0; sum 0 int sumr = 0; sumr 0 for(int i = 0; i < M; i++){
            A[i] = sc.nextInt();
            sum++;
            if(A[i] < X)
                sumr++;
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            A[i] = sc.nextInt();
            sum++;
            if(A[i] < X)
                sumr++;
        } {
            A[i] = sc.nextInt();
            sum++;
            if(A[i] < X)
                sumr++;
        } A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc sum++ sum if(A[i] < X)
                sumr++; A[i] < X A[i] A i X sumr++ sumr sc.close() sc.close sc System.out.println(Math.min(sum-sumr, sumr)) System.out.println System.out System System.out Math.min(sum-sumr, sumr) Math.min Math sum-sumr sum sumr sumr 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];
        int sum = 0;
        int sumr = 0;
        for(int i = 0; i < M; i++){
            A[i] = sc.nextInt();
            sum++;
            if(A[i] < X)
                sumr++;
        }
        sc.close();
        System.out.println(Math.min(sum-sumr, sumr));
   }
} 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];
        int sum = 0;
        int sumr = 0;
        for(int i = 0; i < M; i++){
            A[i] = sc.nextInt();
            sum++;
            if(A[i] < X)
                sumr++;
        }
        sc.close();
        System.out.println(Math.min(sum-sumr, sumr));
   }
} 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[] A = new int[M];
        int sum = 0;
        int sumr = 0;
        for(int i = 0; i < M; i++){
            A[i] = sc.nextInt();
            sum++;
            if(A[i] < X)
                sumr++;
        }
        sc.close();
        System.out.println(Math.min(sum-sumr, sumr));
   }
}