object Main extends App {
  import scala.io.StdIn._

  val Array(n, k, l) = readLine.trim.split(' ').map(_.toLong)
  val series = readLine.trim.split(' ').map(_.toInt)
  println(
    Range(1, n.toInt).upperBound(i ⇒ numOfUnderXSeries(series, i, k.toInt) >= l).get
  )
  def numOfUnderXSeries(num: Array[Int], x: Int, k: Int): Long = {
    val series = num.zipWithIndex.withFilter(_._1 <= x).map(_._2.toLong)
    if (series.length < k) {
      0L
    }else {
      (1 to (series.length - k)).map{left ⇒
        (series(left) - series(left - 1)) * (num.length - series(left + k - 1))
      }.sum + (series(0) + 1) * (num.length - series(k - 1))
    }
  }
  case class Range(from: Int, to: Int){
    def upperBound(predicate: Int ⇒ Boolean): Option[Int] = {
      var left = from
      var right = to
      while (left < right){
        val mid = left + (right - left) / 2
        if (predicate(mid)){
          right = mid
        }else {
          left = mid + 1
        }
      }
      if (left == to && !predicate(left)) None
      else Some(left)
    }
  }
  implicit class ScopeFunc[T](value: T){
    def let[A](func: T ⇒ A): A = func(value)
    def also(func: T ⇒ Unit): T = {
      func(value)
      value
    }
  }
}
