n,c,k = list(map(int,input().split()))

t = list(int(eval(input())) for i in range(n))

t.sort()

ans = 0

i = 0

while i < n:

    a = t[i]

    j = i + 1

    z = 1

    for j in range(i+1,min(i+c,n)):

        if a+k >= t[j]:

            z += 1

        else:

            break

    i += z

    ans += 1

print(ans)
n,c,k = list(map(int,input().split()))

t = list(int(eval(input())) for i in range(n))

t.sort()

ans = 0

x = t[0]

y = 1

for i in range(1,n):

    if x+k < t[i] or y >= c:

        ans += 1

        x = t[i]

        y = 1

    else:

        y += 1

print((ans+1))
n, c, k = list(map(int, input().split()))
t = list(int(eval(input())) for i in range(n))
t.sort()
ans = 0
i = 0
while i < n:
    a = t[i]
    j = i + 1
    z = 1
    for j in range(i + 1, min(i + c, n)):
        if a + k >= t[j]:
            z += 1
        else:
            break
    i += z
    ans += 1
print(ans)

n, c, k = list(map(int, input().split()))
t = list(int(eval(input())) for i in range(n))
t.sort()
ans = 0
x = t[0]
y = 1
for i in range(1, n):
    if x + k < t[i] or y >= c:
        ans += 1
        x = t[i]
        y = 1
    else:
        y += 1
print((ans + 1))

-i = 0 -while i < n: -    a = t[i] -    j = i + 1 -    z = 1 -    for j in range(i + 1, min(i + c, n)): -        if a + k >= t[j]: -            z += 1 -        else: -            break -    i += z -    ans += 1 -print(ans) +x = t[0] +y = 1 +for i in range(1, n): +    if x + k < t[i] or y >= c: +        ans += 1 +        x = t[i] +        y = 1 +    else: +        y += 1 +print((ans + 1))