fun main(args: Array<String>) {
    val (N, M, V, P) = readInputLine().split(" ").map { it.toLong() }
    val AArr = readInputLine().split(" ").map { it.toLong() }.sortedDescending().toLongArray()

    var ans = 0
    var diffNum = 0L
    var overCnt = 0L

    for (i in LongRange(0L, N - 1L)) {
        if (AArr[i.toInt()] + M < AArr[(P - 1L).toInt()]) {
            break
        }
        if (i > P && (P - 1L) * M + (N - i) * M + (AArr[i.toInt()] + M - AArr[(P - 1L).toInt()]) * overCnt + diffNum < M * V) {
            break
        }

        if (i >= P - 1L) {
            diffNum += AArr[(P - 1L).toInt()] - AArr[i.toInt()]
            overCnt++
        }

        ans++
    }

    println(ans)
}

fun readInputLine(): String {
    return readLine()!!
}
