import java.util.*;
import java.util.Collections;
import java.util.ArrayList;

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 = 0;
        int b = 0;

        for(int i=0; i<M; i++){
            if(sc.nextInt()<X){
                a += 1;
            }
            else{
                b += 1;
            }
        }
        if(a<=b){
            System.out.println(a);
        }
        else{
            System.out.println(b);
        }
    } 
} import java.util.*; util.* java import java.util.Collections; Collections java.util import java.util.ArrayList; ArrayList 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 = 0;
        int b = 0;

        for(int i=0; i<M; i++){
            if(sc.nextInt()<X){
                a += 1;
            }
            else{
                b += 1;
            }
        }
        if(a<=b){
            System.out.println(a);
        }
        else{
            System.out.println(b);
        }
    } 
} 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 = 0;
        int b = 0;

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

        int N = sc.nextInt();
        int M = sc.nextInt();
        int X = sc.nextInt();
        int a = 0;
        int b = 0;

        for(int i=0; i<M; i++){
            if(sc.nextInt()<X){
                a += 1;
            }
            else{
                b += 1;
            }
        }
        if(a<=b){
            System.out.println(a);
        }
        else{
            System.out.println(b);
        }
    } 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 = 0; a 0 int b = 0; b 0 for(int i=0; i<M; i++){
            if(sc.nextInt()<X){
                a += 1;
            }
            else{
                b += 1;
            }
        } int i=0; int i=0; i 0 i<M i M i++ i++ i {
            if(sc.nextInt()<X){
                a += 1;
            }
            else{
                b += 1;
            }
        } {
            if(sc.nextInt()<X){
                a += 1;
            }
            else{
                b += 1;
            }
        } if(sc.nextInt()<X){
                a += 1;
            }
            else{
                b += 1;
            } sc.nextInt()<X sc.nextInt() sc.nextInt sc X {
                a += 1;
            } a += 1 a 1 {
                b += 1;
            } b += 1 b 1 if(a<=b){
            System.out.println(a);
        }
        else{
            System.out.println(b);
        } a<=b a b {
            System.out.println(a);
        } System.out.println(a) System.out.println System.out System System.out a {
            System.out.println(b);
        } System.out.println(b) System.out.println System.out System System.out b 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 = 0;
        int b = 0;

        for(int i=0; i<M; i++){
            if(sc.nextInt()<X){
                a += 1;
            }
            else{
                b += 1;
            }
        }
        if(a<=b){
            System.out.println(a);
        }
        else{
            System.out.println(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 = 0;
        int b = 0;

        for(int i=0; i<M; i++){
            if(sc.nextInt()<X){
                a += 1;
            }
            else{
                b += 1;
            }
        }
        if(a<=b){
            System.out.println(a);
        }
        else{
            System.out.println(b);
        }
    } 
} Main
import java.util.*;
import java.util.Collections;
import java.util.ArrayList;

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 = 0;
        int b = 0;

        for(int i=0; i<M; i++){
            if(sc.nextInt()<X){
                a += 1;
            }
            else{
                b += 1;
            }
        }
        if(a<=b){
            System.out.println(a);
        }
        else{
            System.out.println(b);
        }
    } 
}