// Arup Guha
// 6/19/2023
// Solution to Kattis Problem: Coloring Socks
// https://open.kattis.com/problems/color

using namespace std;
#include <bits/stdc++.h>

int main() {

    // Get basic input.
    int n, maxS, maxD;
    cin >> n >> maxS >> maxD;

    // Read and sort socks.
    vector<int> socks(n);
    for (int i=0; i<n; i++)
        cin >> socks[i];
    sort(socks.begin(), socks.end());

    int i = 0,res = 0;

    // Loop through data.
    while (i < n) {

        // j will be ending spot for list of socks in one washer, exclusive.
        int j = i;
        while (j<n && j<i+maxS && socks[j]<=socks[i]+maxD) j++;

        // One more washer, and update i for next batch.
        res++;
        i = j;
    }

    // Ta da!
    cout << res << endl;

    return 0;
}
