import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}


object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val out = new PrintWriter(new BufferedOutputStream(System.out))
    val Array(_, m, x) = in.readLine().split("\\s+").map(_.toInt)
    val as = in.readLine().split("\\s+").map(_.toInt)

    val left = as.count(_ < x)
    val right = m - left
    out.println(
      Math.min(left, right)
    )
    out.flush()
  }
}
