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

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

T.sort()



i = 0

ans = 0

while i < N:

  tmp = i+1

  while tmp < N:

    if tmp < i+C and T[tmp] <= T[i]+K:

      tmp += 1

    else:

      break

  ans += 1

  i = tmp

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

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

T.sort()

T.append(10**12)



ans = 0

now = T[0]

i = 0



while i < N:

    ans += 1

    num = 0

    while i < N and T[i] <= now+K and num < C:

        num += 1

        i += 1

    now = T[i]

print(ans)

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

N, C, K = list(map(int, input().split()))
T = [int(eval(input())) for _ in range(N)]
T.sort()
T.append(10**12)
ans = 0
now = T[0]
i = 0
while i < N:
    ans += 1
    num = 0
    while i < N and T[i] <= now + K and num < C:
        num += 1
        i += 1
    now = T[i]
print(ans)

+T.append(10**12) +ans = 0 +now = T[0] -ans = 0 -    tmp = i + 1 -    while tmp < N: -        if tmp < i + C and T[tmp] <= T[i] + K: -            tmp += 1 -        else: -            break -    i = tmp +    num = 0 +    while i < N and T[i] <= now + K and num < C: +        num += 1 +        i += 1 +    now = T[i]