import sys

input = sys.stdin.readline



N,C,K = list(map(int,input().split()))

T = [int(eval(input())) for _ in range(N)]

T.sort()



answer = 0

first = -K

rest = C

for t in T:

    if first + K >= t and rest > 0:

        # 乗れる

        rest -= 1

        continue

    # 乗れない

    answer += 1

    first = t

    rest = C-1



print(answer)
import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



# greedy



N,C,K,*T = list(map(int,read().split()))



T.sort()



bus_t = -K - 100

bus_c = C

answer = 0

for t in T:

    bl = (bus_t + K >= t) and (bus_c + 1 <= C)

    if bl:

        bus_c += 1

        continue

    answer += 1

    bus_t = t

    bus_c = 1



print(answer)
import sys

input = sys.stdin.readline
N, C, K = list(map(int, input().split()))
T = [int(eval(input())) for _ in range(N)]
T.sort()
answer = 0
first = -K
rest = C
for t in T:
    if first + K >= t and rest > 0:
        # 乗れる
        rest -= 1
        continue
    # 乗れない
    answer += 1
    first = t
    rest = C - 1
print(answer)

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
# greedy
N, C, K, *T = list(map(int, read().split()))
T.sort()
bus_t = -K - 100
bus_c = C
answer = 0
for t in T:
    bl = (bus_t + K >= t) and (bus_c + 1 <= C)
    if bl:
        bus_c += 1
        continue
    answer += 1
    bus_t = t
    bus_c = 1
print(answer)

-input = sys.stdin.readline -N, C, K = list(map(int, input().split())) -T = [int(eval(input())) for _ in range(N)] +read = sys.stdin.buffer.read +readline = sys.stdin.buffer.readline +readlines = sys.stdin.buffer.readlines +# greedy +N, C, K, *T = list(map(int, read().split())) +bus_t = -K - 100 +bus_c = C -first = -K -rest = C -    if first + K >= t and rest > 0: -        # 乗れる -        rest -= 1 +    bl = (bus_t + K >= t) and (bus_c + 1 <= C) +    if bl: +        bus_c += 1 -    # 乗れない -    first = t -    rest = C - 1 +    bus_t = t +    bus_c = 1