import java.util.*;
 
public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		int mas = in.nextInt();
      	int cost = in.nextInt();
      	int start = in.nextInt();
      	int sum1 = 0;
        int sum2 = 0;
      
      for(int i = 0;i < cost;i++){
        int kane = in.nextInt();
        if(kane<start){
          sum1++;
        }else{
          sum2++;
        }
      }
      System.out.print(Math.min(sum1,sum2));
	}
} import java.util.*; util.* java public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		int mas = in.nextInt();
      	int cost = in.nextInt();
      	int start = in.nextInt();
      	int sum1 = 0;
        int sum2 = 0;
      
      for(int i = 0;i < cost;i++){
        int kane = in.nextInt();
        if(kane<start){
          sum1++;
        }else{
          sum2++;
        }
      }
      System.out.print(Math.min(sum1,sum2));
	}
} Main public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		int mas = in.nextInt();
      	int cost = in.nextInt();
      	int start = in.nextInt();
      	int sum1 = 0;
        int sum2 = 0;
      
      for(int i = 0;i < cost;i++){
        int kane = in.nextInt();
        if(kane<start){
          sum1++;
        }else{
          sum2++;
        }
      }
      System.out.print(Math.min(sum1,sum2));
	} main {
		Scanner in = new Scanner(System.in);
		
		int mas = in.nextInt();
      	int cost = in.nextInt();
      	int start = in.nextInt();
      	int sum1 = 0;
        int sum2 = 0;
      
      for(int i = 0;i < cost;i++){
        int kane = in.nextInt();
        if(kane<start){
          sum1++;
        }else{
          sum2++;
        }
      }
      System.out.print(Math.min(sum1,sum2));
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int mas = in.nextInt(); mas in.nextInt() in.nextInt in int cost = in.nextInt(); cost in.nextInt() in.nextInt in int start = in.nextInt(); start in.nextInt() in.nextInt in int sum1 = 0; sum1 0 int sum2 = 0; sum2 0 for(int i = 0;i < cost;i++){
        int kane = in.nextInt();
        if(kane<start){
          sum1++;
        }else{
          sum2++;
        }
      } int i = 0; int i = 0; i 0 i < cost i cost i++ i++ i {
        int kane = in.nextInt();
        if(kane<start){
          sum1++;
        }else{
          sum2++;
        }
      } {
        int kane = in.nextInt();
        if(kane<start){
          sum1++;
        }else{
          sum2++;
        }
      } int kane = in.nextInt(); kane in.nextInt() in.nextInt in if(kane<start){
          sum1++;
        }else{
          sum2++;
        } kane<start kane start {
          sum1++;
        } sum1++ sum1 {
          sum2++;
        } sum2++ sum2 System.out.print(Math.min(sum1,sum2)) System.out.print System.out System System.out Math.min(sum1,sum2) Math.min Math sum1 sum2 String[] args args public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		int mas = in.nextInt();
      	int cost = in.nextInt();
      	int start = in.nextInt();
      	int sum1 = 0;
        int sum2 = 0;
      
      for(int i = 0;i < cost;i++){
        int kane = in.nextInt();
        if(kane<start){
          sum1++;
        }else{
          sum2++;
        }
      }
      System.out.print(Math.min(sum1,sum2));
	}
} public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		int mas = in.nextInt();
      	int cost = in.nextInt();
      	int start = in.nextInt();
      	int sum1 = 0;
        int sum2 = 0;
      
      for(int i = 0;i < cost;i++){
        int kane = in.nextInt();
        if(kane<start){
          sum1++;
        }else{
          sum2++;
        }
      }
      System.out.print(Math.min(sum1,sum2));
	}
} Main
import java.util.*;
 
public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		int mas = in.nextInt();
      	int cost = in.nextInt();
      	int start = in.nextInt();
      	int sum1 = 0;
        int sum2 = 0;
      
      for(int i = 0;i < cost;i++){
        int kane = in.nextInt();
        if(kane<start){
          sum1++;
        }else{
          sum2++;
        }
      }
      System.out.print(Math.min(sum1,sum2));
	}
}