import java.util.Scanner;
class Main{
  public static void main(String args[]){
    int N;
    int M;
    int X;
    int i;
    int a = 0;
    int b = 0;
    int[] A =new int[99];
    Scanner sc = new Scanner(System.in);
    N = sc.nextInt();
    M = sc.nextInt();
    X = sc.nextInt();
    i = M;
    for(i=1;i<=M;i++){
      A[i] = sc.nextInt();
      if(A[i] > X){
        a++ ;
    }else{
        b++ ;
      }
    }

    if(a <= b){
      System.out.println(a);
    }else{
      System.out.println(b);
    }
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String args[]){
    int N;
    int M;
    int X;
    int i;
    int a = 0;
    int b = 0;
    int[] A =new int[99];
    Scanner sc = new Scanner(System.in);
    N = sc.nextInt();
    M = sc.nextInt();
    X = sc.nextInt();
    i = M;
    for(i=1;i<=M;i++){
      A[i] = sc.nextInt();
      if(A[i] > X){
        a++ ;
    }else{
        b++ ;
      }
    }

    if(a <= b){
      System.out.println(a);
    }else{
      System.out.println(b);
    }
  }
} Main public static void main(String args[]){
    int N;
    int M;
    int X;
    int i;
    int a = 0;
    int b = 0;
    int[] A =new int[99];
    Scanner sc = new Scanner(System.in);
    N = sc.nextInt();
    M = sc.nextInt();
    X = sc.nextInt();
    i = M;
    for(i=1;i<=M;i++){
      A[i] = sc.nextInt();
      if(A[i] > X){
        a++ ;
    }else{
        b++ ;
      }
    }

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

    if(a <= b){
      System.out.println(a);
    }else{
      System.out.println(b);
    }
  } int N; N int M; M int X; X int i; i int a = 0; a 0 int b = 0; b 0 int[] A =new int[99]; A new int[99] 99 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) N = sc.nextInt() N sc.nextInt() sc.nextInt sc M = sc.nextInt() M sc.nextInt() sc.nextInt sc X = sc.nextInt() X sc.nextInt() sc.nextInt sc i = M i M for(i=1;i<=M;i++){
      A[i] = sc.nextInt();
      if(A[i] > X){
        a++ ;
    }else{
        b++ ;
      }
    } i=1; i=1 i 1 i<=M i M i++ i++ i {
      A[i] = sc.nextInt();
      if(A[i] > X){
        a++ ;
    }else{
        b++ ;
      }
    } {
      A[i] = sc.nextInt();
      if(A[i] > X){
        a++ ;
    }else{
        b++ ;
      }
    } A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc if(A[i] > X){
        a++ ;
    }else{
        b++ ;
      } A[i] > X A[i] A i X {
        a++ ;
    } a++ a {
        b++ ;
      } b++ b 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
import java.util.Scanner;
class Main{
  public static void main(String args[]){
    int N;
    int M;
    int X;
    int i;
    int a = 0;
    int b = 0;
    int[] A =new int[99];
    Scanner sc = new Scanner(System.in);
    N = sc.nextInt();
    M = sc.nextInt();
    X = sc.nextInt();
    i = M;
    for(i=1;i<=M;i++){
      A[i] = sc.nextInt();
      if(A[i] > X){
        a++ ;
    }else{
        b++ ;
      }
    }

    if(a <= b){
      System.out.println(a);
    }else{
      System.out.println(b);
    }
  }
}
