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

T = []

for _ in range(N):

    T.append((int(eval(input())), False))

    T.append((T[-1][0] + K, True))

T.sort(key=lambda x: (x[0], x[1]))

ans = 0

arrived = 0

head = 0

for t, bo in T:

    if arrived == 0 and not bo:

        head = t

    arrived += not bo

    if (bo and arrived > 0 and head <= t - K) or arrived == C:

        arrived = 0

        ans += 1

        head = 2000000009

if arrived > 0:

    ans += 1

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

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

T.sort()

ans = 0

first = T[0]

arrived = 0

for t in T:

    if first + K < t or arrived == C:

        ans += 1

        arrived = 0

        first = t

    arrived += 1

print((ans + (arrived > 0)))
N, C, K = list(map(int, input().split()))
T = []
for _ in range(N):
    T.append((int(eval(input())), False))
    T.append((T[-1][0] + K, True))
T.sort(key=lambda x: (x[0], x[1]))
ans = 0
arrived = 0
head = 0
for t, bo in T:
    if arrived == 0 and not bo:
        head = t
    arrived += not bo
    if (bo and arrived > 0 and head <= t - K) or arrived == C:
        arrived = 0
        ans += 1
        head = 2000000009
if arrived > 0:
    ans += 1
print(ans)

N, C, K = list(map(int, input().split()))
T = [int(eval(input())) for _ in range(N)]
T.sort()
ans = 0
first = T[0]
arrived = 0
for t in T:
    if first + K < t or arrived == C:
        ans += 1
        arrived = 0
        first = t
    arrived += 1
print((ans + (arrived > 0)))

-T = [] -for _ in range(N): -    T.append((int(eval(input())), False)) -    T.append((T[-1][0] + K, True)) -T.sort(key=lambda x: (x[0], x[1])) +T = [int(eval(input())) for _ in range(N)] +T.sort() +first = T[0] -head = 0 -for t, bo in T: -    if arrived == 0 and not bo: -        head = t -    arrived += not bo -    if (bo and arrived > 0 and head <= t - K) or arrived == C: +for t in T: +    if first + K < t or arrived == C: +        ans += 1 -        ans += 1 -        head = 2000000009 -if arrived > 0: -    ans += 1 -print(ans) +        first = t +    arrived += 1 +print((ans + (arrived > 0)))