fun main(arr:Array<String>) {
    val (n,m,x) = readLine()!!.split(" ").map { it.toInt() }
    val ryokinsyo = readLine()!!.split(" ").map { it.toInt() }

    val to0 = ryokinsyo.filter { it < x }.size
    val toN = ryokinsyo.size - to0
    println(Math.min(to0, toN))
}