import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);	
		int n= stdin.nextInt();
		int m= stdin.nextInt();
		int x= stdin.nextInt();
		int up=0;
		int down=0;
		int num=0;
		for(int i=0;i<m;i++) {
			num = stdin.nextInt();
			if(num>x) {
				up++;
			}else {
				down++;
			}
			
		}
		if(up<down) {
			System.out.println(up);
		}else {
			System.out.println(down);
		}

		
		


	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);	
		int n= stdin.nextInt();
		int m= stdin.nextInt();
		int x= stdin.nextInt();
		int up=0;
		int down=0;
		int num=0;
		for(int i=0;i<m;i++) {
			num = stdin.nextInt();
			if(num>x) {
				up++;
			}else {
				down++;
			}
			
		}
		if(up<down) {
			System.out.println(up);
		}else {
			System.out.println(down);
		}

		
		


	}

} Main public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);	
		int n= stdin.nextInt();
		int m= stdin.nextInt();
		int x= stdin.nextInt();
		int up=0;
		int down=0;
		int num=0;
		for(int i=0;i<m;i++) {
			num = stdin.nextInt();
			if(num>x) {
				up++;
			}else {
				down++;
			}
			
		}
		if(up<down) {
			System.out.println(up);
		}else {
			System.out.println(down);
		}

		
		


	} main {
		Scanner stdin = new Scanner(System.in);	
		int n= stdin.nextInt();
		int m= stdin.nextInt();
		int x= stdin.nextInt();
		int up=0;
		int down=0;
		int num=0;
		for(int i=0;i<m;i++) {
			num = stdin.nextInt();
			if(num>x) {
				up++;
			}else {
				down++;
			}
			
		}
		if(up<down) {
			System.out.println(up);
		}else {
			System.out.println(down);
		}

		
		


	} Scanner stdin = new Scanner(System.in); stdin new Scanner(System.in) int n= stdin.nextInt(); n stdin.nextInt() stdin.nextInt stdin int m= stdin.nextInt(); m stdin.nextInt() stdin.nextInt stdin int x= stdin.nextInt(); x stdin.nextInt() stdin.nextInt stdin int up=0; up 0 int down=0; down 0 int num=0; num 0 for(int i=0;i<m;i++) {
			num = stdin.nextInt();
			if(num>x) {
				up++;
			}else {
				down++;
			}
			
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			num = stdin.nextInt();
			if(num>x) {
				up++;
			}else {
				down++;
			}
			
		} {
			num = stdin.nextInt();
			if(num>x) {
				up++;
			}else {
				down++;
			}
			
		} num = stdin.nextInt() num stdin.nextInt() stdin.nextInt stdin if(num>x) {
				up++;
			}else {
				down++;
			} num>x num x {
				up++;
			} up++ up {
				down++;
			} down++ down if(up<down) {
			System.out.println(up);
		}else {
			System.out.println(down);
		} up<down up down {
			System.out.println(up);
		} System.out.println(up) System.out.println System.out System System.out up {
			System.out.println(down);
		} System.out.println(down) System.out.println System.out System System.out down String[] args args public class Main {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);	
		int n= stdin.nextInt();
		int m= stdin.nextInt();
		int x= stdin.nextInt();
		int up=0;
		int down=0;
		int num=0;
		for(int i=0;i<m;i++) {
			num = stdin.nextInt();
			if(num>x) {
				up++;
			}else {
				down++;
			}
			
		}
		if(up<down) {
			System.out.println(up);
		}else {
			System.out.println(down);
		}

		
		


	}

} public class Main {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);	
		int n= stdin.nextInt();
		int m= stdin.nextInt();
		int x= stdin.nextInt();
		int up=0;
		int down=0;
		int num=0;
		for(int i=0;i<m;i++) {
			num = stdin.nextInt();
			if(num>x) {
				up++;
			}else {
				down++;
			}
			
		}
		if(up<down) {
			System.out.println(up);
		}else {
			System.out.println(down);
		}

		
		


	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);	
		int n= stdin.nextInt();
		int m= stdin.nextInt();
		int x= stdin.nextInt();
		int up=0;
		int down=0;
		int num=0;
		for(int i=0;i<m;i++) {
			num = stdin.nextInt();
			if(num>x) {
				up++;
			}else {
				down++;
			}
			
		}
		if(up<down) {
			System.out.println(up);
		}else {
			System.out.println(down);
		}

		
		


	}

}
