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

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



count = 0

passengers = 0

border = 0

for i in range(n):

    if border == 0:

        border = times[i] + k

    if c > passengers and border >= times[i]:

        passengers += 1

        if passengers == c:

            count += 1

            passengers = 0

            border = 0

    elif border < times[i]:

        count += 1

        passengers = 1

        border = times[i] + k



print((count + 1 if passengers > 0 else count))
n, c, k = list(map(int, input().split()))

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



count = 1

passengers = 0

border = times[0] + k

for t in times:

    passengers += 1

    if c < passengers or border < t:

        count += 1

        passengers = 1

        border = t + k



print(count)
n, c, k = list(map(int, input().split()))
times = sorted([int(eval(input())) for _ in range(n)])
count = 0
passengers = 0
border = 0
for i in range(n):
    if border == 0:
        border = times[i] + k
    if c > passengers and border >= times[i]:
        passengers += 1
        if passengers == c:
            count += 1
            passengers = 0
            border = 0
    elif border < times[i]:
        count += 1
        passengers = 1
        border = times[i] + k
print((count + 1 if passengers > 0 else count))

n, c, k = list(map(int, input().split()))
times = sorted([int(eval(input())) for _ in range(n)])
count = 1
passengers = 0
border = times[0] + k
for t in times:
    passengers += 1
    if c < passengers or border < t:
        count += 1
        passengers = 1
        border = t + k
print(count)

-count = 0 +count = 1 -border = 0 -for i in range(n): -    if border == 0: -        border = times[i] + k -    if c > passengers and border >= times[i]: -        passengers += 1 -        if passengers == c: -            count += 1 -            passengers = 0 -            border = 0 -    elif border < times[i]: +border = times[0] + k +for t in times: +    passengers += 1 +    if c < passengers or border < t: -        border = times[i] + k -print((count + 1 if passengers > 0 else count)) +        border = t + k +print(count)