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[M];
    
    for(int i=0; i<M; i++){
      A[i] = sc.nextInt();
      if(X<A[i]){
        if(i <= (double)M/2){
          System.out.println(i);
          break;
        } else {
          System.out.println(M-i);
          break;
        }
      }
    }
  }
} 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[M];
    
    for(int i=0; i<M; i++){
      A[i] = sc.nextInt();
      if(X<A[i]){
        if(i <= (double)M/2){
          System.out.println(i);
          break;
        } else {
          System.out.println(M-i);
          break;
        }
      }
    }
  }
} 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();
      if(X<A[i]){
        if(i <= (double)M/2){
          System.out.println(i);
          break;
        } else {
          System.out.println(M-i);
          break;
        }
      }
    }
  } 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();
      if(X<A[i]){
        if(i <= (double)M/2){
          System.out.println(i);
          break;
        } else {
          System.out.println(M-i);
          break;
        }
      }
    }
  } 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();
      if(X<A[i]){
        if(i <= (double)M/2){
          System.out.println(i);
          break;
        } else {
          System.out.println(M-i);
          break;
        }
      }
    } int i=0; int i=0; i 0 i<M i M i++ i++ i {
      A[i] = sc.nextInt();
      if(X<A[i]){
        if(i <= (double)M/2){
          System.out.println(i);
          break;
        } else {
          System.out.println(M-i);
          break;
        }
      }
    } {
      A[i] = sc.nextInt();
      if(X<A[i]){
        if(i <= (double)M/2){
          System.out.println(i);
          break;
        } else {
          System.out.println(M-i);
          break;
        }
      }
    } A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc if(X<A[i]){
        if(i <= (double)M/2){
          System.out.println(i);
          break;
        } else {
          System.out.println(M-i);
          break;
        }
      } X<A[i] X A[i] A i {
        if(i <= (double)M/2){
          System.out.println(i);
          break;
        } else {
          System.out.println(M-i);
          break;
        }
      } if(i <= (double)M/2){
          System.out.println(i);
          break;
        } else {
          System.out.println(M-i);
          break;
        } i <= (double)M/2 i (double)M/2 (double)M 2 {
          System.out.println(i);
          break;
        } System.out.println(i) System.out.println System.out System System.out i break; {
          System.out.println(M-i);
          break;
        } System.out.println(M-i) System.out.println System.out System System.out M-i M i break; 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];
    
    for(int i=0; i<M; i++){
      A[i] = sc.nextInt();
      if(X<A[i]){
        if(i <= (double)M/2){
          System.out.println(i);
          break;
        } else {
          System.out.println(M-i);
          break;
        }
      }
    }
  }
} 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();
      if(X<A[i]){
        if(i <= (double)M/2){
          System.out.println(i);
          break;
        } else {
          System.out.println(M-i);
          break;
        }
      }
    }
  }
} 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[M];
    
    for(int i=0; i<M; i++){
      A[i] = sc.nextInt();
      if(X<A[i]){
        if(i <= (double)M/2){
          System.out.println(i);
          break;
        } else {
          System.out.println(M-i);
          break;
        }
      }
    }
  }
}