from bisect import bisect_right

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

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

cnt = 0

cur = 0

while cur<N:

    i = min(cur+C,N)-1

    if T[i]-T[cur]<=K:

        cnt += 1

        cur = i+1

    else:

        i = bisect_right(T,T[cur]+K)-1

        cnt += 1

        cur = i+1

print(cnt)
from bisect import bisect_right

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

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

cur = 0

cnt = 0

while cur<N:

    ind = bisect_right(T,T[cur]+K)

    if ind-cur<=C:

        cnt += 1

        cur = ind

    else:

        cnt += 1

        cur += C

print(cnt)
from bisect import bisect_right

N, C, K = list(map(int, input().split()))
T = sorted([int(eval(input())) for _ in range(N)])
cnt = 0
cur = 0
while cur < N:
    i = min(cur + C, N) - 1
    if T[i] - T[cur] <= K:
        cnt += 1
        cur = i + 1
    else:
        i = bisect_right(T, T[cur] + K) - 1
        cnt += 1
        cur = i + 1
print(cnt)

from bisect import bisect_right

N, C, K = list(map(int, input().split()))
T = sorted([int(eval(input())) for _ in range(N)])
cur = 0
cnt = 0
while cur < N:
    ind = bisect_right(T, T[cur] + K)
    if ind - cur <= C:
        cnt += 1
        cur = ind
    else:
        cnt += 1
        cur += C
print(cnt)

+cur = 0 -cur = 0 -    i = min(cur + C, N) - 1 -    if T[i] - T[cur] <= K: +    ind = bisect_right(T, T[cur] + K) +    if ind - cur <= C: -        cur = i + 1 +        cur = ind -        i = bisect_right(T, T[cur] + K) - 1 -        cur = i + 1 +        cur += C