n,c,k = list(map(int, input().split()))

Ts = [int(eval(input())) for i in range(n)] + [10**10]

Ts = sorted(Ts)



ans = 0

cnt = 1

flg = 0

prev = Ts[0]

for i in range(1,len(Ts)):

    now = Ts[i]

    if now - prev <= k:

        cnt += 1

    else:

        ans += 1

        cnt = 1

        prev = Ts[i]

    if cnt > c:

        ans += 1

        cnt = 1

        prev = Ts[i]

    # print("i",i,"cnt",cnt,"ans",ans)

print(ans)



import sys

input = sys.stdin.readline

n,c,k  = list(map(int, input().split()))

ts = [int(eval(input())) for i in range(n)]

ts.sort()

cnt = 0

ans = 0

end = -1

for i, t in enumerate(ts):

    if end < t:

        cnt = 1

        ans += 1

        end = t + k

    else: # t <= end

        cnt += 1

    if cnt > c:

        cnt = 1

        ans += 1

        end = t + k

print(ans)

        
n, c, k = list(map(int, input().split()))
Ts = [int(eval(input())) for i in range(n)] + [10**10]
Ts = sorted(Ts)
ans = 0
cnt = 1
flg = 0
prev = Ts[0]
for i in range(1, len(Ts)):
    now = Ts[i]
    if now - prev <= k:
        cnt += 1
    else:
        ans += 1
        cnt = 1
        prev = Ts[i]
    if cnt > c:
        ans += 1
        cnt = 1
        prev = Ts[i]
    # print("i",i,"cnt",cnt,"ans",ans)
print(ans)

import sys

input = sys.stdin.readline
n, c, k = list(map(int, input().split()))
ts = [int(eval(input())) for i in range(n)]
ts.sort()
cnt = 0
ans = 0
end = -1
for i, t in enumerate(ts):
    if end < t:
        cnt = 1
        ans += 1
        end = t + k
    else:  # t <= end
        cnt += 1
    if cnt > c:
        cnt = 1
        ans += 1
        end = t + k
print(ans)

+import sys + +input = sys.stdin.readline -Ts = [int(eval(input())) for i in range(n)] + [10**10] -Ts = sorted(Ts) +ts = [int(eval(input())) for i in range(n)] +ts.sort() +cnt = 0 -cnt = 1 -flg = 0 -prev = Ts[0] -for i in range(1, len(Ts)): -    now = Ts[i] -    if now - prev <= k: +end = -1 +for i, t in enumerate(ts): +    if end < t: +        cnt = 1 +        ans += 1 +        end = t + k +    else:  # t <= end -    else: +    if cnt > c: +        cnt = 1 -        cnt = 1 -        prev = Ts[i] -    if cnt > c: -        ans += 1 -        cnt = 1 -        prev = Ts[i] -    # print("i",i,"cnt",cnt,"ans",ans) +        end = t + k