#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <queue>
#include <set>
#include <vector>
#include <cmath>
#include <cstdio>

using namespace std;
#define MAX 1000000
//priority_queue<int,vector<int>, less<int> > rq1;
//priority_queue<int, vector< int>, greater<int> > rq;
typedef long long ll;

struct node
{
    ll x,y;
};

bool com(node a,node d)
{
    return a.x<d.x;
}
node arr[100005];

int main()
{
    ll n,c,K;
    cin >>n>>c>>K;
    for(int i=0; i<n; i++)
    {
        cin>>arr[i].x;
        arr[i].y=arr[i].x+K;
    }
    sort(arr,arr+n,com);

    node k=arr[0];
    ll sum=0;
    int rs=1;
    for(int i=1; i<n; i++)
    {
       // cout <<rs<<"res"<<endl;
        if(arr[i].x<=k.y)
        {

            if(rs==c)
            {
                sum++;
                rs=1;
                k=arr[i];
       //  cout <<k.x<<"*****";

            }
            else
                rs++;
        }
        if(arr[i].x>k.y)
        {
            sum++;
            rs=1;
            k=arr[i];
        // cout <<k.x<<"********";
        }

    }
    //cout <<rs<<"rs"<<endl;
    if(rs>0)
        sum++;
    cout <<sum<<endl;

    return 0;
}
