import sys

input = sys.stdin.readline



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

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

T.sort()

now = 0

ans = 0



while now<N:

    ans += 1

    lim = T[now]+K

    

    for _ in range(C):

        if T[now]<=lim:

            now += 1

        else:

            break

        

        if now==N:

            break



print(ans)
import sys

input = sys.stdin.readline



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

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

T.sort()

ans = 0

i = 0



while i<N:

    lim = T[i]+K

    ans += 1

    cnt = 0

    

    while i<N and cnt<C and T[i]<=lim:

        i += 1

        cnt += 1

        

print(ans)
import sys

input = sys.stdin.readline
N, C, K = list(map(int, input().split()))
T = [int(eval(input())) for _ in range(N)]
T.sort()
now = 0
ans = 0
while now < N:
    ans += 1
    lim = T[now] + K
    for _ in range(C):
        if T[now] <= lim:
            now += 1
        else:
            break
        if now == N:
            break
print(ans)

import sys

input = sys.stdin.readline
N, C, K = list(map(int, input().split()))
T = [int(eval(input())) for _ in range(N)]
T.sort()
ans = 0
i = 0
while i < N:
    lim = T[i] + K
    ans += 1
    cnt = 0
    while i < N and cnt < C and T[i] <= lim:
        i += 1
        cnt += 1
print(ans)

-now = 0 -while now < N: +i = 0 +while i < N: +    lim = T[i] + K -    lim = T[now] + K -    for _ in range(C): -        if T[now] <= lim: -            now += 1 -        else: -            break -        if now == N: -            break +    cnt = 0 +    while i < N and cnt < C and T[i] <= lim: +        i += 1 +        cnt += 1