import java.util.*;
import java.util.Collections;
import java.util.stream.Collectors;

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 Zero = 0;
    int cnt = 0;
    for (int i = 0; i < M; i++) {
      if (X > sc.nextInt()) {
        Zero++;
      } else {
        cnt++;
      }
    }
    System.out.println(Math.min(Zero, cnt));
  }
} import java.util.*; util.* java import java.util.Collections; Collections java.util import java.util.stream.Collectors; Collectors java.util.stream 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 Zero = 0;
    int cnt = 0;
    for (int i = 0; i < M; i++) {
      if (X > sc.nextInt()) {
        Zero++;
      } else {
        cnt++;
      }
    }
    System.out.println(Math.min(Zero, cnt));
  }
} 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 Zero = 0;
    int cnt = 0;
    for (int i = 0; i < M; i++) {
      if (X > sc.nextInt()) {
        Zero++;
      } else {
        cnt++;
      }
    }
    System.out.println(Math.min(Zero, cnt));
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int X = sc.nextInt();
    int Zero = 0;
    int cnt = 0;
    for (int i = 0; i < M; i++) {
      if (X > sc.nextInt()) {
        Zero++;
      } else {
        cnt++;
      }
    }
    System.out.println(Math.min(Zero, cnt));
  } 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 Zero = 0; Zero 0 int cnt = 0; cnt 0 for (int i = 0; i < M; i++) {
      if (X > sc.nextInt()) {
        Zero++;
      } else {
        cnt++;
      }
    } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
      if (X > sc.nextInt()) {
        Zero++;
      } else {
        cnt++;
      }
    } {
      if (X > sc.nextInt()) {
        Zero++;
      } else {
        cnt++;
      }
    } if (X > sc.nextInt()) {
        Zero++;
      } else {
        cnt++;
      } X > sc.nextInt() X sc.nextInt() sc.nextInt sc {
        Zero++;
      } Zero++ Zero {
        cnt++;
      } cnt++ cnt System.out.println(Math.min(Zero, cnt)) System.out.println System.out System System.out Math.min(Zero, cnt) Math.min Math Zero cnt 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 Zero = 0;
    int cnt = 0;
    for (int i = 0; i < M; i++) {
      if (X > sc.nextInt()) {
        Zero++;
      } else {
        cnt++;
      }
    }
    System.out.println(Math.min(Zero, cnt));
  }
} 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 Zero = 0;
    int cnt = 0;
    for (int i = 0; i < M; i++) {
      if (X > sc.nextInt()) {
        Zero++;
      } else {
        cnt++;
      }
    }
    System.out.println(Math.min(Zero, cnt));
  }
} Main
import java.util.*;
import java.util.Collections;
import java.util.stream.Collectors;

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 Zero = 0;
    int cnt = 0;
    for (int i = 0; i < M; i++) {
      if (X > sc.nextInt()) {
        Zero++;
      } else {
        cnt++;
      }
    }
    System.out.println(Math.min(Zero, cnt));
  }
}
