import scala.io.StdIn

object Main extends App {
  val Array(n, m, x) = StdIn.readLine().split(' ').map(_.toInt)
  val costs = StdIn.readLine().split(' ').map(_.toInt)
  val c1 = costs.count(p => p < x)
  println(scala.math.min(c1, m - c1))

}