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[N];

    for (int i = 0; i < M; i++) {
      A[i] = sc.nextInt();
    }

    sc.close();

    int count = 0;

    for (int i = 0; i < M; i++) {

      if (A[i] < X) {
        count++;
      }

    }

    if (count < M/2) {
      System.out.println(count);
    } else {
      System.out.println(M - count);
    }

  }

} 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[N];

    for (int i = 0; i < M; i++) {
      A[i] = sc.nextInt();
    }

    sc.close();

    int count = 0;

    for (int i = 0; i < M; i++) {

      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[N];

    for (int i = 0; i < M; i++) {
      A[i] = sc.nextInt();
    }

    sc.close();

    int count = 0;

    for (int i = 0; i < M; i++) {

      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[N];

    for (int i = 0; i < M; i++) {
      A[i] = sc.nextInt();
    }

    sc.close();

    int count = 0;

    for (int i = 0; i < M; i++) {

      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[N]; A new int[N] N 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 sc.close() sc.close sc int count = 0; count 0 for (int i = 0; i < M; i++) {

      if (A[i] < X) {
        count++;
      }

    } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {

      if (A[i] < X) {
        count++;
      }

    } {

      if (A[i] < X) {
        count++;
      }

    } 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[N];

    for (int i = 0; i < M; i++) {
      A[i] = sc.nextInt();
    }

    sc.close();

    int count = 0;

    for (int i = 0; i < M; i++) {

      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[N];

    for (int i = 0; i < M; i++) {
      A[i] = sc.nextInt();
    }

    sc.close();

    int count = 0;

    for (int i = 0; i < M; i++) {

      if (A[i] < X) {
        count++;
      }

    }

    if (count < M/2) {
      System.out.println(count);
    } else {
      System.out.println(M - count);
    }

  }

} 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[N];

    for (int i = 0; i < M; i++) {
      A[i] = sc.nextInt();
    }

    sc.close();

    int count = 0;

    for (int i = 0; i < M; i++) {

      if (A[i] < X) {
        count++;
      }

    }

    if (count < M/2) {
      System.out.println(count);
    } else {
      System.out.println(M - count);
    }

  }

}