import collections



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

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



t.sort()



passenger = 0

departure_limit = t[0] + k

bus_cnt = 0



for T in t:

    if passenger+1 > c or T > departure_limit:

        departure_limit = T+k

        passenger = 1

        bus_cnt += 1

    else:

        passenger+=1



print((bus_cnt+1))
n, c, k, *t = list(map(int, open(0).read().split()))

t.sort()

tmp = 0

cnt = 0

limit = t[0] + k

for time in t:

    if tmp == c or time > limit:

        limit = time + k

        tmp = 1

        cnt += 1

    else:

        tmp += 1

print((cnt + 1))
import collections

n, c, k = list(map(int, input().split()))
t = [int(eval(input())) for i in range(n)]
t.sort()
passenger = 0
departure_limit = t[0] + k
bus_cnt = 0
for T in t:
    if passenger + 1 > c or T > departure_limit:
        departure_limit = T + k
        passenger = 1
        bus_cnt += 1
    else:
        passenger += 1
print((bus_cnt + 1))

n, c, k, *t = list(map(int, open(0).read().split()))
t.sort()
tmp = 0
cnt = 0
limit = t[0] + k
for time in t:
    if tmp == c or time > limit:
        limit = time + k
        tmp = 1
        cnt += 1
    else:
        tmp += 1
print((cnt + 1))

-import collections - -n, c, k = list(map(int, input().split())) -t = [int(eval(input())) for i in range(n)] +n, c, k, *t = list(map(int, open(0).read().split())) -passenger = 0 -departure_limit = t[0] + k -bus_cnt = 0 -for T in t: -    if passenger + 1 > c or T > departure_limit: -        departure_limit = T + k -        passenger = 1 -        bus_cnt += 1 +tmp = 0 +cnt = 0 +limit = t[0] + k +for time in t: +    if tmp == c or time > limit: +        limit = time + k +        tmp = 1 +        cnt += 1 -        passenger += 1 -print((bus_cnt + 1)) +        tmp += 1 +print((cnt + 1))