from collections import deque



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

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



tk = [(ti, ti+k) for ti in t]

tk.sort(key=lambda x:x[1])

tk = deque(tk)

#print(tk)





ans = 0

# tkが尽きるまで

while tk:

    _, bus = tk[0]

    

    # バスの時刻より早く来ている客をカウント

    cnt = 0

    while (tk[cnt][0] <= bus) and (cnt < c):

        cnt += 1

        

        if cnt == len(tk):

            break

        

        

    # バスの定員もしくはいる人数を乗せていく

    for _ in range(min(cnt,c)):

        tk.popleft()

    

    ans += 1

        

print(ans)
import sys

stdin = sys.stdin

 

sys.setrecursionlimit(10**5) 

 

def li(): return list(map(int, stdin.readline().split()))

def li_(): return [int(x)-1 for x in stdin.readline().split()]

def lf(): return list(map(float, stdin.readline().split()))

def ls(): return stdin.readline().split()

def ns(): return stdin.readline().rstrip()

def lc(): return list(ns())

def ni(): return int(stdin.readline())

def nf(): return float(stdin.readline())



n,c,k = li()

t = [ni() for _ in range(n)]



t.sort()



ans = 0

people = 0

isfirst = True

for ti in t:

    if isfirst:

        first = ti

        people = 1

        isfirst = False

        

    else:

        if ti <= first + k and people < c:

            people += 1

            

        else:

            ans += 1

            

            people = 1

            first = ti



print((ans+1))
from collections import deque

n, c, k = list(map(int, input().split()))
t = [int(eval(input())) for _ in range(n)]
tk = [(ti, ti + k) for ti in t]
tk.sort(key=lambda x: x[1])
tk = deque(tk)
# print(tk)
ans = 0
# tkが尽きるまで
while tk:
    _, bus = tk[0]
    # バスの時刻より早く来ている客をカウント
    cnt = 0
    while (tk[cnt][0] <= bus) and (cnt < c):
        cnt += 1
        if cnt == len(tk):
            break
    # バスの定員もしくはいる人数を乗せていく
    for _ in range(min(cnt, c)):
        tk.popleft()
    ans += 1
print(ans)

import sys

stdin = sys.stdin
sys.setrecursionlimit(10**5)


def li():
    return list(map(int, stdin.readline().split()))


def li_():
    return [int(x) - 1 for x in stdin.readline().split()]


def lf():
    return list(map(float, stdin.readline().split()))


def ls():
    return stdin.readline().split()


def ns():
    return stdin.readline().rstrip()


def lc():
    return list(ns())


def ni():
    return int(stdin.readline())


def nf():
    return float(stdin.readline())


n, c, k = li()
t = [ni() for _ in range(n)]
t.sort()
ans = 0
people = 0
isfirst = True
for ti in t:
    if isfirst:
        first = ti
        people = 1
        isfirst = False
    else:
        if ti <= first + k and people < c:
            people += 1
        else:
            ans += 1
            people = 1
            first = ti
print((ans + 1))

-from collections import deque +import sys -n, c, k = list(map(int, input().split())) -t = [int(eval(input())) for _ in range(n)] -tk = [(ti, ti + k) for ti in t] -tk.sort(key=lambda x: x[1]) -tk = deque(tk) -# print(tk) +stdin = sys.stdin +sys.setrecursionlimit(10**5) + + +def li(): +    return list(map(int, stdin.readline().split())) + + +def li_(): +    return [int(x) - 1 for x in stdin.readline().split()] + + +def lf(): +    return list(map(float, stdin.readline().split())) + + +def ls(): +    return stdin.readline().split() + + +def ns(): +    return stdin.readline().rstrip() + + +def lc(): +    return list(ns()) + + +def ni(): +    return int(stdin.readline()) + + +def nf(): +    return float(stdin.readline()) + + +n, c, k = li() +t = [ni() for _ in range(n)] +t.sort() -# tkが尽きるまで -while tk: -    _, bus = tk[0] -    # バスの時刻より早く来ている客をカウント -    cnt = 0 -    while (tk[cnt][0] <= bus) and (cnt < c): -        cnt += 1 -        if cnt == len(tk): -            break -    # バスの定員もしくはいる人数を乗せていく -    for _ in range(min(cnt, c)): -        tk.popleft() -    ans += 1 -print(ans) +people = 0 +isfirst = True +for ti in t: +    if isfirst: +        first = ti +        people = 1 +        isfirst = False +    else: +        if ti <= first + k and people < c: +            people += 1 +        else: +            ans += 1 +            people = 1 +            first = ti +print((ans + 1))