"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const C = parseInt(arg[0].split(" ")[1]);
    const K = parseInt(arg[0].split(" ")[2]);
    
    const T = arg.slice(1, N + 1).map(n=>parseInt(n)).sort((a,b)=>a-b);
    
    let peopleNowRiding = [];
    let answer = 0;
    
    for(let i=0; i<N; i++) {
        peopleNowRiding.push(T[i]);

        for(let j=i+1; j<=i+C; j++) {
            if(peopleNowRiding.length < C && T[j] - T[i] <= K) {
                peopleNowRiding.push(T[j]);
            } else {                
                i = j - 1;
                answer++;
                
                peopleNowRiding = [];
                break;
            }
        }
    }
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
