#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
typedef long long Int;
int asc(const void *a, const void *b) {
    Int d = *(Int *)a - *(Int *)b;
    return (d > 0) ? 1 : (d < 0) ? -1 : 0;
}

int main() {
    Int n, c, k;
    scanf("%lld %lld %lld", &n, &c, &k);
    Int *T = (Int *)malloc(sizeof(Int) * n);
    rep(i, n) scanf("%lld", T + i);
    qsort(T, n, sizeof(Int), asc);
    bool waiting = false;
    Int start_time = 0;
    Int waiting_people = 0;
    Int ans = 0;
    rep(i, n) {
        Int t = T[i];
        if (waiting) {
            if (t - start_time <= k) {
                waiting_people++;
            } else {
                ans++;
                waiting = true;
                start_time = t;
                waiting_people = 1;
            }
        } else {
            waiting = true;
            start_time = t;
            waiting_people = 1;
        }
        if (waiting_people == c) {
            waiting = false;
            waiting_people = 0;
            ans++;
        }
    }
    if (waiting) {
        ans++;
    }
    printf("%lld\n", ans);
}
