import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        sc.nextInt();
        int M = sc.nextInt();
        int X = sc.nextInt();
        int a = 0;
        int b = 0;
        for(int i = 0; i < M; i++){
            int c = sc.nextInt();
            if(c < X) a++;
            else b++;
        }
        System.out.println(Math.min(a, b));
        sc.close();

    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        sc.nextInt();
        int M = sc.nextInt();
        int X = sc.nextInt();
        int a = 0;
        int b = 0;
        for(int i = 0; i < M; i++){
            int c = sc.nextInt();
            if(c < X) a++;
            else b++;
        }
        System.out.println(Math.min(a, b));
        sc.close();

    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        sc.nextInt();
        int M = sc.nextInt();
        int X = sc.nextInt();
        int a = 0;
        int b = 0;
        for(int i = 0; i < M; i++){
            int c = sc.nextInt();
            if(c < X) a++;
            else b++;
        }
        System.out.println(Math.min(a, b));
        sc.close();

    } main {
        Scanner sc = new Scanner(System.in);
        sc.nextInt();
        int M = sc.nextInt();
        int X = sc.nextInt();
        int a = 0;
        int b = 0;
        for(int i = 0; i < M; i++){
            int c = sc.nextInt();
            if(c < X) a++;
            else b++;
        }
        System.out.println(Math.min(a, b));
        sc.close();

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) 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 = 0; a 0 int b = 0; b 0 for(int i = 0; i < M; i++){
            int c = sc.nextInt();
            if(c < X) a++;
            else b++;
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            int c = sc.nextInt();
            if(c < X) a++;
            else b++;
        } {
            int c = sc.nextInt();
            if(c < X) a++;
            else b++;
        } int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc if(c < X) a++;
            else b++; c < X c X a++ a b++ b System.out.println(Math.min(a, b)) System.out.println System.out System System.out Math.min(a, b) Math.min Math a b sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        sc.nextInt();
        int M = sc.nextInt();
        int X = sc.nextInt();
        int a = 0;
        int b = 0;
        for(int i = 0; i < M; i++){
            int c = sc.nextInt();
            if(c < X) a++;
            else b++;
        }
        System.out.println(Math.min(a, b));
        sc.close();

    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        sc.nextInt();
        int M = sc.nextInt();
        int X = sc.nextInt();
        int a = 0;
        int b = 0;
        for(int i = 0; i < M; i++){
            int c = sc.nextInt();
            if(c < X) a++;
            else b++;
        }
        System.out.println(Math.min(a, b));
        sc.close();

    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        sc.nextInt();
        int M = sc.nextInt();
        int X = sc.nextInt();
        int a = 0;
        int b = 0;
        for(int i = 0; i < M; i++){
            int c = sc.nextInt();
            if(c < X) a++;
            else b++;
        }
        System.out.println(Math.min(a, b));
        sc.close();

    }

}
