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

T = []

for i in range(N):

    T.append(int(eval(input())))

sorted_T = sorted(T)

bus_count = 1

pas_count = 0

bus_start = sorted_T[0]

for t in sorted_T:

    if pas_count == C or t - bus_start > K:

        bus_count += 1

        pas_count = 0

        bus_start = t

    pas_count += 1

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

flag = True

pass_num = 0

count = 1

for t in sorted([int(eval(input())) for _ in range(N)]):

    if flag:

        first_pass_time = t

        flag = False

    if t - first_pass_time > K or pass_num == C:

        first_pass_time = t

        pass_num = 0

        count += 1

    pass_num += 1

print(count)
N, C, K = list(map(int, input().split()))
T = []
for i in range(N):
    T.append(int(eval(input())))
sorted_T = sorted(T)
bus_count = 1
pas_count = 0
bus_start = sorted_T[0]
for t in sorted_T:
    if pas_count == C or t - bus_start > K:
        bus_count += 1
        pas_count = 0
        bus_start = t
    pas_count += 1
print(bus_count)

N, C, K = list(map(int, input().split()))
flag = True
pass_num = 0
count = 1
for t in sorted([int(eval(input())) for _ in range(N)]):
    if flag:
        first_pass_time = t
        flag = False
    if t - first_pass_time > K or pass_num == C:
        first_pass_time = t
        pass_num = 0
        count += 1
    pass_num += 1
print(count)

-T = [] -for i in range(N): -    T.append(int(eval(input()))) -sorted_T = sorted(T) -bus_count = 1 -pas_count = 0 -bus_start = sorted_T[0] -for t in sorted_T: -    if pas_count == C or t - bus_start > K: -        bus_count += 1 -        pas_count = 0 -        bus_start = t -    pas_count += 1 -print(bus_count) +flag = True +pass_num = 0 +count = 1 +for t in sorted([int(eval(input())) for _ in range(N)]): +    if flag: +        first_pass_time = t +        flag = False +    if t - first_pass_time > K or pass_num == C: +        first_pass_time = t +        pass_num = 0 +        count += 1 +    pass_num += 1 +print(count)