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

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

ans = 0

count = 0



for i in range(N):

    now = Tlist[i]

    if count == 0:

        rl = now + K

        count += 1

        continue

    else:

        if now <= rl <= now + K and count < C:

            count += 1

        else:

            ans += 1

            rl = now + K

            count = 1

print((ans + 1))

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

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

ans = 0

now = 1

start = Tlist[0]

for t in Tlist[1:]:

    if now == C:

        ans += 1

        start = t

        now = 1

    else:

        if t - start <= K:

            now += 1

        else:

            ans += 1

            start = t

            now = 1

print((ans+1))

N, C, K = list(map(int, input().split()))
Tlist = sorted([int(eval(input())) for _ in range(N)])
ans = 0
count = 0
for i in range(N):
    now = Tlist[i]
    if count == 0:
        rl = now + K
        count += 1
        continue
    else:
        if now <= rl <= now + K and count < C:
            count += 1
        else:
            ans += 1
            rl = now + K
            count = 1
print((ans + 1))

N, C, K = list(map(int, input().split()))
Tlist = sorted([int(eval(input())) for _ in range(N)])
ans = 0
now = 1
start = Tlist[0]
for t in Tlist[1:]:
    if now == C:
        ans += 1
        start = t
        now = 1
    else:
        if t - start <= K:
            now += 1
        else:
            ans += 1
            start = t
            now = 1
print((ans + 1))

-count = 0 -for i in range(N): -    now = Tlist[i] -    if count == 0: -        rl = now + K -        count += 1 -        continue +now = 1 +start = Tlist[0] +for t in Tlist[1:]: +    if now == C: +        ans += 1 +        start = t +        now = 1 -        if now <= rl <= now + K and count < C: -            count += 1 +        if t - start <= K: +            now += 1 -            rl = now + K -            count = 1 +            start = t +            now = 1