object Main extends App{
val Array(n,m,x) = scala.io.StdIn.readLine.split("\\s").map(_.toInt)

val a_list = scala.io.StdIn.readLine.split("\\s").map(_.toInt)

val hoge = a_list.partition(i => i>=x)

println(Seq(hoge._1.length,hoge._2.length).min)
}