import bisect



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

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



i = 0

ans = 0



while T:

    ans += 1

    check = T[0] + K

    people = bisect.bisect_right(T, check)

    if people > C:

        del T[:C]

    else:

        del T[:people]



print(ans)
import bisect

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

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



ans = 0

front = 0

while front < N:

    standard = T[front] + K

    front = min(bisect.bisect_right(T, standard), front+C)

    ans += 1

print(ans)
import bisect

N, C, K = list(map(int, input().split()))
T = sorted([int(eval(input())) for i in range(N)])
i = 0
ans = 0
while T:
    ans += 1
    check = T[0] + K
    people = bisect.bisect_right(T, check)
    if people > C:
        del T[:C]
    else:
        del T[:people]
print(ans)

import bisect

N, C, K = list(map(int, input().split()))
T = sorted([int(eval(input())) for i in range(N)])
ans = 0
front = 0
while front < N:
    standard = T[front] + K
    front = min(bisect.bisect_right(T, standard), front + C)
    ans += 1
print(ans)

-i = 0 -while T: +front = 0 +while front < N: +    standard = T[front] + K +    front = min(bisect.bisect_right(T, standard), front + C) -    check = T[0] + K -    people = bisect.bisect_right(T, check) -    if people > C: -        del T[:C] -    else: -        del T[:people]