object Main extends App {
  val Array(n, m, x) = io.StdIn.readLine().split(" ").map(_.toInt)
  val costPos = io.StdIn.readLine().split(" ").map(_.toInt)
  val costL = costPos.count(p => p < x)
  println(math.min(costL,m-costL))
}