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

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

T.sort()

#print(T)

Bcnt = 0

while True:

    if len(T) <= 0:

        break

    BS = T[0] + K

    Bcnt += 1

    del T[0]

    cnt = 1

    while cnt < C and len(T) > 0:

        if T[0] <= BS:

            del T[0]

            cnt += 1

        else:

            break

print(Bcnt)

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

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

T.sort()

#print(T)

Bcnt = 0

i = 0

while True:

    if len(T) <= i:

        break

    BS = T[i] + K

    Bcnt += 1

    i += 1

    cnt = 1

    while cnt < C and len(T) > i:

        if T[i] <= BS:

            i += 1

            cnt += 1

        else:

            break

print(Bcnt)

N, C, K = list(map(int, input().split()))
T = [int(eval(input())) for i in range(N)]
T.sort()
# print(T)
Bcnt = 0
while True:
    if len(T) <= 0:
        break
    BS = T[0] + K
    Bcnt += 1
    del T[0]
    cnt = 1
    while cnt < C and len(T) > 0:
        if T[0] <= BS:
            del T[0]
            cnt += 1
        else:
            break
print(Bcnt)

N, C, K = list(map(int, input().split()))
T = [int(eval(input())) for i in range(N)]
T.sort()
# print(T)
Bcnt = 0
i = 0
while True:
    if len(T) <= i:
        break
    BS = T[i] + K
    Bcnt += 1
    i += 1
    cnt = 1
    while cnt < C and len(T) > i:
        if T[i] <= BS:
            i += 1
            cnt += 1
        else:
            break
print(Bcnt)

+i = 0 -    if len(T) <= 0: +    if len(T) <= i: -    BS = T[0] + K +    BS = T[i] + K -    del T[0] +    i += 1 -    while cnt < C and len(T) > 0: -        if T[0] <= BS: -            del T[0] +    while cnt < C and len(T) > i: +        if T[i] <= BS: +            i += 1