import java.util.Scanner;

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 count = 0;
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            if (a[i] < x) {
                count++;
            }
        }
        if (count <= m / 2) {
            System.out.println(count);
        } else {
            System.out.println(m - count);
        }
    }
} import java.util.Scanner; Scanner 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 count = 0;
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            if (a[i] < x) {
                count++;
            }
        }
        if (count <= m / 2) {
            System.out.println(count);
        } else {
            System.out.println(m - count);
        }
    }
} 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 count = 0;
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            if (a[i] < x) {
                count++;
            }
        }
        if (count <= m / 2) {
            System.out.println(count);
        } else {
            System.out.println(m - count);
        }
    } 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 count = 0;
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            if (a[i] < x) {
                count++;
            }
        }
        if (count <= m / 2) {
            System.out.println(count);
        } else {
            System.out.println(m - count);
        }
    } 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 count = 0; count 0 for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            if (a[i] < x) {
                count++;
            }
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            a[i] = sc.nextInt();
            if (a[i] < x) {
                count++;
            }
        } {
            a[i] = sc.nextInt();
            if (a[i] < x) {
                count++;
            }
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc if (a[i] < x) {
                count++;
            } a[i] < x a[i] a i x {
                count++;
            } count++ count if (count <= m / 2) {
            System.out.println(count);
        } else {
            System.out.println(m - count);
        } count <= m / 2 count m / 2 m 2 {
            System.out.println(count);
        } System.out.println(count) System.out.println System.out System System.out count {
            System.out.println(m - count);
        } System.out.println(m - count) System.out.println System.out System System.out m - count m count 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 count = 0;
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            if (a[i] < x) {
                count++;
            }
        }
        if (count <= m / 2) {
            System.out.println(count);
        } else {
            System.out.println(m - count);
        }
    }
} 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 count = 0;
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            if (a[i] < x) {
                count++;
            }
        }
        if (count <= m / 2) {
            System.out.println(count);
        } else {
            System.out.println(m - count);
        }
    }
} Main
import java.util.Scanner;

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 count = 0;
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
            if (a[i] < x) {
                count++;
            }
        }
        if (count <= m / 2) {
            System.out.println(count);
        } else {
            System.out.println(m - count);
        }
    }
}