N, C, K = [int(_) for _ in input().split()]

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

count = 0

while times:

    t = times.pop(0)

    count += 1

    num = 1

    while times:

        if times[0] <= t + K and num < C:

            times.pop(0)

            num += 1

        else:

            break

print(count)

N, C, K = [int(_) for _ in input().split()]

times = sorted([int(eval(input())) for _ in range(N)], reverse=True)

count = 0

while times:

    t = times.pop()

    count += 1

    num = 1

    while times:

        if times[-1] <= t + K and num < C:

            times.pop()

            num += 1

        else:

            break

print(count)

N, C, K = [int(_) for _ in input().split()]
times = sorted([int(eval(input())) for _ in range(N)])
count = 0
while times:
    t = times.pop(0)
    count += 1
    num = 1
    while times:
        if times[0] <= t + K and num < C:
            times.pop(0)
            num += 1
        else:
            break
print(count)

N, C, K = [int(_) for _ in input().split()]
times = sorted([int(eval(input())) for _ in range(N)], reverse=True)
count = 0
while times:
    t = times.pop()
    count += 1
    num = 1
    while times:
        if times[-1] <= t + K and num < C:
            times.pop()
            num += 1
        else:
            break
print(count)

-times = sorted([int(eval(input())) for _ in range(N)]) +times = sorted([int(eval(input())) for _ in range(N)], reverse=True) -    t = times.pop(0) +    t = times.pop() -        if times[0] <= t + K and num < C: -            times.pop(0) +        if times[-1] <= t + K and num < C: +            times.pop()