#include<iostream>
#include<algorithm>
using namespace std;
int a[100005];
int main(){
	int n,c,m;
	int i,j,k;
	int s=0;
	cin>>n>>c>>m;
	for(i=0;i<n;i++){
		cin>>a[i];
	}
	sort(a,a+n);
	for(i=0;i<n;){
		k=a[i]+m;
		for(j=0,s++;j<c;j++,i++){
			if(i==n)break;
			if(a[i]>k)break;
		}
	}
	cout<<s<<endl;
	return 0;
}
