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];
        for (int i=0; i<M; i++) {
            a[i] = sc.nextInt();
        }

        int ans = solve(N, M, X, a);
        System.out.println(ans);
    }

    private static int solve(int N, int M, int X, int[] a) {
        int[] score = new int[2];

        int idx = 0;
        for (int i=0; i<M; i++) {
            if (a[i] > X) {
                idx = 1;
            }

            score[idx]++;
        }

        return Math.min(score[0], score[1]);
    }
} 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];
        for (int i=0; i<M; i++) {
            a[i] = sc.nextInt();
        }

        int ans = solve(N, M, X, a);
        System.out.println(ans);
    }

    private static int solve(int N, int M, int X, int[] a) {
        int[] score = new int[2];

        int idx = 0;
        for (int i=0; i<M; i++) {
            if (a[i] > X) {
                idx = 1;
            }

            score[idx]++;
        }

        return Math.min(score[0], score[1]);
    }
} 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];
        for (int i=0; i<M; i++) {
            a[i] = sc.nextInt();
        }

        int ans = solve(N, M, X, a);
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int M = sc.nextInt();
        int X = sc.nextInt();
        int[] a = new int[M];
        for (int i=0; i<M; i++) {
            a[i] = sc.nextInt();
        }

        int ans = solve(N, M, X, a);
        System.out.println(ans);
    } 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 for (int i=0; i<M; i++) {
            a[i] = sc.nextInt();
        } int i=0; int i=0; i 0 i<M i M i++ i++ i {
            a[i] = sc.nextInt();
        } {
            a[i] = sc.nextInt();
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc int ans = solve(N, M, X, a); ans solve(N, M, X, a) solve N M X a System.out.println(ans) System.out.println System.out System System.out ans String[] args args private static int solve(int N, int M, int X, int[] a) {
        int[] score = new int[2];

        int idx = 0;
        for (int i=0; i<M; i++) {
            if (a[i] > X) {
                idx = 1;
            }

            score[idx]++;
        }

        return Math.min(score[0], score[1]);
    } solve {
        int[] score = new int[2];

        int idx = 0;
        for (int i=0; i<M; i++) {
            if (a[i] > X) {
                idx = 1;
            }

            score[idx]++;
        }

        return Math.min(score[0], score[1]);
    } int[] score = new int[2]; score new int[2] 2 int idx = 0; idx 0 for (int i=0; i<M; i++) {
            if (a[i] > X) {
                idx = 1;
            }

            score[idx]++;
        } int i=0; int i=0; i 0 i<M i M i++ i++ i {
            if (a[i] > X) {
                idx = 1;
            }

            score[idx]++;
        } {
            if (a[i] > X) {
                idx = 1;
            }

            score[idx]++;
        } if (a[i] > X) {
                idx = 1;
            } a[i] > X a[i] a i X {
                idx = 1;
            } idx = 1 idx 1 score[idx]++ score[idx] score idx return Math.min(score[0], score[1]); Math.min(score[0], score[1]) Math.min Math score[0] score 0 score[1] score 1 int N N int M M int X X int[] a a 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];
        for (int i=0; i<M; i++) {
            a[i] = sc.nextInt();
        }

        int ans = solve(N, M, X, a);
        System.out.println(ans);
    }

    private static int solve(int N, int M, int X, int[] a) {
        int[] score = new int[2];

        int idx = 0;
        for (int i=0; i<M; i++) {
            if (a[i] > X) {
                idx = 1;
            }

            score[idx]++;
        }

        return Math.min(score[0], score[1]);
    }
} 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];
        for (int i=0; i<M; i++) {
            a[i] = sc.nextInt();
        }

        int ans = solve(N, M, X, a);
        System.out.println(ans);
    }

    private static int solve(int N, int M, int X, int[] a) {
        int[] score = new int[2];

        int idx = 0;
        for (int i=0; i<M; i++) {
            if (a[i] > X) {
                idx = 1;
            }

            score[idx]++;
        }

        return Math.min(score[0], score[1]);
    }
} 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];
        for (int i=0; i<M; i++) {
            a[i] = sc.nextInt();
        }

        int ans = solve(N, M, X, a);
        System.out.println(ans);
    }

    private static int solve(int N, int M, int X, int[] a) {
        int[] score = new int[2];

        int idx = 0;
        for (int i=0; i<M; i++) {
            if (a[i] > X) {
                idx = 1;
            }

            score[idx]++;
        }

        return Math.min(score[0], score[1]);
    }
}
