n,c,k = [int(x) for x in input().split()]

t = []

for _ in range(n):

    t.append(int(eval(input())))

t.sort()



ans = 0

tmp = {"f": 0, "num": c}



for x in t:

    if tmp["f"] >= x and tmp["num"] > 0:

        tmp["num"] -= 1

    else:

        ans += 1

        tmp["num"] = c-1

        tmp["f"] = x+k





print(ans)

n,c,k = [int(x) for x in input().split()]

t = [int(eval(input())) for _ in range(n)]

t.sort()

bus = c

f_bus = 0

ans = 0

for i in range(n):

    if t[i] > f_bus or bus == 0:

        ans += 1

        f_bus = t[i]+k

        bus = c-1

    else:

        bus -= 1



print(ans)
n, c, k = [int(x) for x in input().split()]
t = []
for _ in range(n):
    t.append(int(eval(input())))
t.sort()
ans = 0
tmp = {"f": 0, "num": c}
for x in t:
    if tmp["f"] >= x and tmp["num"] > 0:
        tmp["num"] -= 1
    else:
        ans += 1
        tmp["num"] = c - 1
        tmp["f"] = x + k
print(ans)

n, c, k = [int(x) for x in input().split()]
t = [int(eval(input())) for _ in range(n)]
t.sort()
bus = c
f_bus = 0
ans = 0
for i in range(n):
    if t[i] > f_bus or bus == 0:
        ans += 1
        f_bus = t[i] + k
        bus = c - 1
    else:
        bus -= 1
print(ans)

-t = [] -for _ in range(n): -    t.append(int(eval(input()))) +t = [int(eval(input())) for _ in range(n)] +bus = c +f_bus = 0 -tmp = {"f": 0, "num": c} -for x in t: -    if tmp["f"] >= x and tmp["num"] > 0: -        tmp["num"] -= 1 +for i in range(n): +    if t[i] > f_bus or bus == 0: +        ans += 1 +        f_bus = t[i] + k +        bus = c - 1 -        ans += 1 -        tmp["num"] = c - 1 -        tmp["f"] = x + k +        bus -= 1