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):

        cnt += 1

        

        if cnt == len(tk):

            break

        

        

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

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

        tk.popleft()

    

    ans += 1

        

print(ans)

    
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)
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:
        cnt += 1
        if cnt == len(tk):
            break
    # バスの定員もしくはいる人数を乗せていく
    for _ in range(min(cnt, c)):
        tk.popleft()
    ans += 1
print(ans)

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)

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