import java.util.*;

public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int X = sc.nextInt();
   	int count=0;
    int j=0;
    int Nums[]=new int[M];
    for(int i=0;i<M;i++){
    	Nums[i]=sc.nextInt();
    }

    if(X<N/2){
    for(int i=M-1;i>=0;i--){
    	if(Nums[i]<X){
          count++;
   		 }
      }
    }else{
      for(int i=0;i<M;i++){
    	if(Nums[i]>X){
          count++;
   		 }
    }
    }
    System.out.println(count);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int X = sc.nextInt();
   	int count=0;
    int j=0;
    int Nums[]=new int[M];
    for(int i=0;i<M;i++){
    	Nums[i]=sc.nextInt();
    }

    if(X<N/2){
    for(int i=M-1;i>=0;i--){
    	if(Nums[i]<X){
          count++;
   		 }
      }
    }else{
      for(int i=0;i<M;i++){
    	if(Nums[i]>X){
          count++;
   		 }
    }
    }
    System.out.println(count);
  }
} Main public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int X = sc.nextInt();
   	int count=0;
    int j=0;
    int Nums[]=new int[M];
    for(int i=0;i<M;i++){
    	Nums[i]=sc.nextInt();
    }

    if(X<N/2){
    for(int i=M-1;i>=0;i--){
    	if(Nums[i]<X){
          count++;
   		 }
      }
    }else{
      for(int i=0;i<M;i++){
    	if(Nums[i]>X){
          count++;
   		 }
    }
    }
    System.out.println(count);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int X = sc.nextInt();
   	int count=0;
    int j=0;
    int Nums[]=new int[M];
    for(int i=0;i<M;i++){
    	Nums[i]=sc.nextInt();
    }

    if(X<N/2){
    for(int i=M-1;i>=0;i--){
    	if(Nums[i]<X){
          count++;
   		 }
      }
    }else{
      for(int i=0;i<M;i++){
    	if(Nums[i]>X){
          count++;
   		 }
    }
    }
    System.out.println(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 count=0; count 0 int j=0; j 0 int Nums[]=new int[M]; Nums new int[M] M for(int i=0;i<M;i++){
    	Nums[i]=sc.nextInt();
    } int i=0; int i=0; i 0 i<M i M i++ i++ i {
    	Nums[i]=sc.nextInt();
    } {
    	Nums[i]=sc.nextInt();
    } Nums[i]=sc.nextInt() Nums[i] Nums i sc.nextInt() sc.nextInt sc if(X<N/2){
    for(int i=M-1;i>=0;i--){
    	if(Nums[i]<X){
          count++;
   		 }
      }
    }else{
      for(int i=0;i<M;i++){
    	if(Nums[i]>X){
          count++;
   		 }
    }
    } X<N/2 X N/2 N 2 {
    for(int i=M-1;i>=0;i--){
    	if(Nums[i]<X){
          count++;
   		 }
      }
    } for(int i=M-1;i>=0;i--){
    	if(Nums[i]<X){
          count++;
   		 }
      } int i=M-1; int i=M-1; i M-1 M 1 i>=0 i 0 i-- i-- i {
    	if(Nums[i]<X){
          count++;
   		 }
      } {
    	if(Nums[i]<X){
          count++;
   		 }
      } if(Nums[i]<X){
          count++;
   		 } Nums[i]<X Nums[i] Nums i X {
          count++;
   		 } count++ count {
      for(int i=0;i<M;i++){
    	if(Nums[i]>X){
          count++;
   		 }
    }
    } for(int i=0;i<M;i++){
    	if(Nums[i]>X){
          count++;
   		 }
    } int i=0; int i=0; i 0 i<M i M i++ i++ i {
    	if(Nums[i]>X){
          count++;
   		 }
    } {
    	if(Nums[i]>X){
          count++;
   		 }
    } if(Nums[i]>X){
          count++;
   		 } Nums[i]>X Nums[i] Nums i X {
          count++;
   		 } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int X = sc.nextInt();
   	int count=0;
    int j=0;
    int Nums[]=new int[M];
    for(int i=0;i<M;i++){
    	Nums[i]=sc.nextInt();
    }

    if(X<N/2){
    for(int i=M-1;i>=0;i--){
    	if(Nums[i]<X){
          count++;
   		 }
      }
    }else{
      for(int i=0;i<M;i++){
    	if(Nums[i]>X){
          count++;
   		 }
    }
    }
    System.out.println(count);
  }
} public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int X = sc.nextInt();
   	int count=0;
    int j=0;
    int Nums[]=new int[M];
    for(int i=0;i<M;i++){
    	Nums[i]=sc.nextInt();
    }

    if(X<N/2){
    for(int i=M-1;i>=0;i--){
    	if(Nums[i]<X){
          count++;
   		 }
      }
    }else{
      for(int i=0;i<M;i++){
    	if(Nums[i]>X){
          count++;
   		 }
    }
    }
    System.out.println(count);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int X = sc.nextInt();
   	int count=0;
    int j=0;
    int Nums[]=new int[M];
    for(int i=0;i<M;i++){
    	Nums[i]=sc.nextInt();
    }

    if(X<N/2){
    for(int i=M-1;i>=0;i--){
    	if(Nums[i]<X){
          count++;
   		 }
      }
    }else{
      for(int i=0;i<M;i++){
    	if(Nums[i]>X){
          count++;
   		 }
    }
    }
    System.out.println(count);
  }
}
