#include <bits/stdc++.h>

#define pb push_back
#define mk make_pair
#define sc second
#define fr first

using namespace std;


int main () {
       int n, c, k;
       cin >> n >> c >> k;

       deque <int> v(n);
       for(int i = 0;i < n;i ++)
           cin >> v[i];

       sort(v.begin(), v.end());
       int cnt = 0;
       while(1)
       {
             int r = v.front() + k, t = 1;
             while(!v.empty() && v.front() < r)
             {
                  v.pop_front();
                  t ++;
                  if(t > c) break;
             }
             cnt ++;
             if(v.empty()) break;
       }
       cout << cnt;
}
