import sys, re

from collections import deque, defaultdict, Counter

from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2, log

from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby

from operator import itemgetter, mul

from copy import deepcopy

from string import ascii_lowercase, ascii_uppercase, digits

from bisect import bisect, bisect_left, insort, insort_left

from fractions import gcd

from heapq import heappush, heappop

from functools import reduce

from decimal import Decimal

def input(): return sys.stdin.readline().strip()

def INT(): return int(eval(input()))

def MAP(): return list(map(int, input().split()))

def LIST(): return list(map(int, input().split()))

def ZIP(n): return list(zip(*(MAP() for _ in range(n))))

sys.setrecursionlimit(10 ** 9)

INF = float('inf')

mod = 10**9 + 7

from decimal import *



N, C, K = MAP()

T = [INT() for _ in range(N)]



T.sort()

idx = 0

ans = 0



while idx < N :

	tmp = T[idx]

	if idx+C <= bisect(T, tmp+K):

		idx += C

	else:

		idx = bisect(T, tmp+K)

	ans += 1



print(ans)
import sys, re

from collections import deque, defaultdict, Counter

from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2, log

from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby

from operator import itemgetter, mul

from copy import deepcopy

from string import ascii_lowercase, ascii_uppercase, digits

from bisect import bisect, bisect_left, insort, insort_left

from fractions import gcd

from heapq import heappush, heappop

from functools import reduce

from decimal import Decimal

def input(): return sys.stdin.readline().strip()

def INT(): return int(eval(input()))

def MAP(): return list(map(int, input().split()))

def LIST(): return list(map(int, input().split()))

def ZIP(n): return list(zip(*(MAP() for _ in range(n))))

sys.setrecursionlimit(10 ** 9)

INF = float('inf')

mod = 10**9 + 7

from decimal import *



N, C, K = MAP()

T = [INT() for _ in range(N)]



T.sort()



ans = 1

cnt = 1

t_limit = T[0] + K



for i in range(1, N):

	if cnt == C:   #人数上限

		t_limit = T[i] + K

		cnt = 1

		ans += 1

	elif T[i] <= t_limit: #乗れる

		cnt += 1 

	else:          #待ち時間上限

		t_limit = T[i] + K

		cnt = 1

		ans += 1

print(ans)
import sys, re
from collections import deque, defaultdict, Counter
from math import (
    ceil,
    sqrt,
    hypot,
    factorial,
    pi,
    sin,
    cos,
    tan,
    asin,
    acos,
    atan,
    radians,
    degrees,
)  # , log2, log
from itertools import (
    accumulate,
    permutations,
    combinations,
    combinations_with_replacement,
    product,
    groupby,
)
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
from decimal import Decimal


def input():
    return sys.stdin.readline().strip()


def INT():
    return int(eval(input()))


def MAP():
    return list(map(int, input().split()))


def LIST():
    return list(map(int, input().split()))


def ZIP(n):
    return list(zip(*(MAP() for _ in range(n))))


sys.setrecursionlimit(10**9)
INF = float("inf")
mod = 10**9 + 7
from decimal import *

N, C, K = MAP()
T = [INT() for _ in range(N)]
T.sort()
idx = 0
ans = 0
while idx < N:
    tmp = T[idx]
    if idx + C <= bisect(T, tmp + K):
        idx += C
    else:
        idx = bisect(T, tmp + K)
    ans += 1
print(ans)

import sys, re
from collections import deque, defaultdict, Counter
from math import (
    ceil,
    sqrt,
    hypot,
    factorial,
    pi,
    sin,
    cos,
    tan,
    asin,
    acos,
    atan,
    radians,
    degrees,
)  # , log2, log
from itertools import (
    accumulate,
    permutations,
    combinations,
    combinations_with_replacement,
    product,
    groupby,
)
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
from decimal import Decimal


def input():
    return sys.stdin.readline().strip()


def INT():
    return int(eval(input()))


def MAP():
    return list(map(int, input().split()))


def LIST():
    return list(map(int, input().split()))


def ZIP(n):
    return list(zip(*(MAP() for _ in range(n))))


sys.setrecursionlimit(10**9)
INF = float("inf")
mod = 10**9 + 7
from decimal import *

N, C, K = MAP()
T = [INT() for _ in range(N)]
T.sort()
ans = 1
cnt = 1
t_limit = T[0] + K
for i in range(1, N):
    if cnt == C:  # 人数上限
        t_limit = T[i] + K
        cnt = 1
        ans += 1
    elif T[i] <= t_limit:  # 乗れる
        cnt += 1
    else:  # 待ち時間上限
        t_limit = T[i] + K
        cnt = 1
        ans += 1
print(ans)

-idx = 0 -ans = 0 -while idx < N: -    tmp = T[idx] -    if idx + C <= bisect(T, tmp + K): -        idx += C -    else: -        idx = bisect(T, tmp + K) -    ans += 1 +ans = 1 +cnt = 1 +t_limit = T[0] + K +for i in range(1, N): +    if cnt == C:  # 人数上限 +        t_limit = T[i] + K +        cnt = 1 +        ans += 1 +    elif T[i] <= t_limit:  # 乗れる +        cnt += 1 +    else:  # 待ち時間上限 +        t_limit = T[i] + K +        cnt = 1 +        ans += 1