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

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

T.sort()

answer = 0

while len(T) > 0:

    limit = T[0] + K

    counter = 0

    while counter < C:

        if len(T) == 0:

            break

        if T[0] > limit:

            break

        del T[0]

        counter += 1

    answer += 1

print(answer)

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

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

T.sort()

limit = T[0]

answer = 1

counter = 1

for i in range(1,N):

    if T[i] - limit > K or counter == C:

        limit = T[i]

        counter = 1

        answer += 1

    else:

        counter += 1

print(answer)
N, C, K = list(map(int, input().split()))
T = [int(eval(input())) for i in range(N)]
T.sort()
answer = 0
while len(T) > 0:
    limit = T[0] + K
    counter = 0
    while counter < C:
        if len(T) == 0:
            break
        if T[0] > limit:
            break
        del T[0]
        counter += 1
    answer += 1
print(answer)

N, C, K = list(map(int, input().split()))
T = [int(eval(input())) for i in range(N)]
T.sort()
limit = T[0]
answer = 1
counter = 1
for i in range(1, N):
    if T[i] - limit > K or counter == C:
        limit = T[i]
        counter = 1
        answer += 1
    else:
        counter += 1
print(answer)

-answer = 0 -while len(T) > 0: -    limit = T[0] + K -    counter = 0 -    while counter < C: -        if len(T) == 0: -            break -        if T[0] > limit: -            break -        del T[0] +limit = T[0] +answer = 1 +counter = 1 +for i in range(1, N): +    if T[i] - limit > K or counter == C: +        limit = T[i] +        counter = 1 +        answer += 1 +    else: -    answer += 1