fun main(args: Array<String>) {
    val (n, c, k) = readLine()?.split(" ")?.map { it.toLong() } ?: return
    val tList = (0 until n).map {
        readLine()?.toLong()!!
    }.sorted()

    var i = 0
    var bus = 0

    while (i < n) {
        val endLimit = tList[i++] + k
        var count = 1L
        while (i < n && tList[i] <= endLimit && count < c) {
            count++
            i++
        }
        bus++
    }

    println(bus)
}