import scala.io.StdIn._

object Main extends App {
  val Seq(n, m, x) = readLine().split(" ").map(_.toInt).toSeq
  val a            = readLine().split(" ").map(_.toInt).toSeq

  val large = a.count(_ > x)
  val small = a.length - large
  println(math.min(large, small))
}
