object Main extends App{
  import scala.io.StdIn.readLine
  
  val x = readLine.split(" ")(2).toInt
  val gates = readLine.split(" ").map(_.toInt)
  val tozero = gates.filter(_ < x).length
  
  println(List((gates.length - tozero),tozero).min.toString)
}
