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



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



bus = []

indexes = [i for i in range(N)]

sorted_indexes = sorted(indexes, key=lambda i: T[i])



count = 0

for i in range(N):

    if count == 0:

        first = T[sorted_indexes[i]]

        count += 1

    else:

        if T[sorted_indexes[i]] - first <= K:

            count += 1

        else:

            bus.append(count)

            first = T[sorted_indexes[i]]

            count = 1

    if count >= C:

        bus.append(count)

        count = 0



if count > 0:

    bus.append(count)



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



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

T.sort()



bus = []



count = 0

for i in range(N):

    if count == 0:

        first = T[i]

        count += 1

    else:

        if T[i] - first <= K:

            count += 1

        else:

            bus.append(count)

            first = T[i]

            count = 1

    if count >= C:

        bus.append(count)

        count = 0



if count > 0:

    bus.append(count)



print((len(bus)))
N, C, K = list(map(int, input().split()))
T = [int(eval(input())) for _ in range(N)]
bus = []
indexes = [i for i in range(N)]
sorted_indexes = sorted(indexes, key=lambda i: T[i])
count = 0
for i in range(N):
    if count == 0:
        first = T[sorted_indexes[i]]
        count += 1
    else:
        if T[sorted_indexes[i]] - first <= K:
            count += 1
        else:
            bus.append(count)
            first = T[sorted_indexes[i]]
            count = 1
    if count >= C:
        bus.append(count)
        count = 0
if count > 0:
    bus.append(count)
print((len(bus)))

N, C, K = list(map(int, input().split()))
T = [int(eval(input())) for _ in range(N)]
T.sort()
bus = []
count = 0
for i in range(N):
    if count == 0:
        first = T[i]
        count += 1
    else:
        if T[i] - first <= K:
            count += 1
        else:
            bus.append(count)
            first = T[i]
            count = 1
    if count >= C:
        bus.append(count)
        count = 0
if count > 0:
    bus.append(count)
print((len(bus)))

+T.sort() -indexes = [i for i in range(N)] -sorted_indexes = sorted(indexes, key=lambda i: T[i]) -        first = T[sorted_indexes[i]] +        first = T[i] -        if T[sorted_indexes[i]] - first <= K: +        if T[i] - first <= K: -            first = T[sorted_indexes[i]] +            first = T[i]