# A - Airport Bus



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

T = [int(eval(input())) for i in range(N)]

T.sort()

ans = 0

c = 0

dead_time = 0



for i in range(N):

    if c==0 or T[i]>dead_time:

        dead_time = T[i]+K

        ans += 1

        c = 0

    c = (c+1)%C



print(ans)
import sys

from sys import exit

from collections import deque

from bisect import bisect_left, bisect_right, insort_left, insort_right #func(リスト,値)

from heapq import heapify, heappop, heappush

from math import *



sys.setrecursionlimit(10**6)

INF = 10**20

eps = 1.0e-20

MOD = 10**9+7



def lcm(x,y):

    return x*y//gcd(x,y)

def mint():

    return map(int,input().split())

def lint():

    return list(map(int,input().split()))

def ilint():

    return int(input()), list(map(int,input().split()))

def judge(x, l=['Yes', 'No']):

    print(l[0] if x else l[1])

def lprint(l, sep='\n'):

    for x in l:

        print(x, end=sep)

def ston(c, c0='a'):

    return ord(c)-ord(c0)

def ntos(x, c0='a'):

    return chr(x+ord(c0))

class counter(dict):

    def __init__(self, *args):

        super().__init__(args)

    def add(self,x):

        self.setdefault(x,0)

        self[x] += 1



N,C,K = mint()

T = [int(input()) for _ in range(N)]

T.sort()

t0 = 0

i = 0

ans = 0

for t in T:

    if i==0:

        t0 = t

        i = 1

        ans += 1

    elif t-t0>K:

        t0 = t

        i = 1

        ans += 1

    else:

        i += 1

    if i==C:

        i = 0

print(ans)

# A - Airport Bus
N, C, K = list(map(int, input().split()))
T = [int(eval(input())) for i in range(N)]
T.sort()
ans = 0
c = 0
dead_time = 0
for i in range(N):
    if c == 0 or T[i] > dead_time:
        dead_time = T[i] + K
        ans += 1
        c = 0
    c = (c + 1) % C
print(ans)

import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right  # func(リスト,値)
from heapq import heapify, heappop, heappush
from math import *

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9 + 7


def lcm(x, y):
    return x * y // gcd(x, y)


def mint():
    return map(int, input().split())


def lint():
    return list(map(int, input().split()))


def ilint():
    return int(input()), list(map(int, input().split()))


def judge(x, l=["Yes", "No"]):
    print(l[0] if x else l[1])


def lprint(l, sep="\n"):
    for x in l:
        print(x, end=sep)


def ston(c, c0="a"):
    return ord(c) - ord(c0)


def ntos(x, c0="a"):
    return chr(x + ord(c0))


class counter(dict):
    def __init__(self, *args):
        super().__init__(args)

    def add(self, x):
        self.setdefault(x, 0)
        self[x] += 1


N, C, K = mint()
T = [int(input()) for _ in range(N)]
T.sort()
t0 = 0
i = 0
ans = 0
for t in T:
    if i == 0:
        t0 = t
        i = 1
        ans += 1
    elif t - t0 > K:
        t0 = t
        i = 1
        ans += 1
    else:
        i += 1
    if i == C:
        i = 0
print(ans)

-# A - Airport Bus -N, C, K = list(map(int, input().split())) -T = [int(eval(input())) for i in range(N)] +import sys +from sys import exit +from collections import deque +from bisect import bisect_left, bisect_right, insort_left, insort_right  # func(リスト,値) +from heapq import heapify, heappop, heappush +from math import * + +sys.setrecursionlimit(10**6) +INF = 10**20 +eps = 1.0e-20 +MOD = 10**9 + 7 + + +def lcm(x, y): +    return x * y // gcd(x, y) + + +def mint(): +    return map(int, input().split()) + + +def lint(): +    return list(map(int, input().split())) + + +def ilint(): +    return int(input()), list(map(int, input().split())) + + +def judge(x, l=["Yes", "No"]): +    print(l[0] if x else l[1]) + + +def lprint(l, sep="\n"): +    for x in l: +        print(x, end=sep) + + +def ston(c, c0="a"): +    return ord(c) - ord(c0) + + +def ntos(x, c0="a"): +    return chr(x + ord(c0)) + + +class counter(dict): +    def __init__(self, *args): +        super().__init__(args) + +    def add(self, x): +        self.setdefault(x, 0) +        self[x] += 1 + + +N, C, K = mint() +T = [int(input()) for _ in range(N)] +t0 = 0 +i = 0 -c = 0 -dead_time = 0 -for i in range(N): -    if c == 0 or T[i] > dead_time: -        dead_time = T[i] + K +for t in T: +    if i == 0: +        t0 = t +        i = 1 -        c = 0 -    c = (c + 1) % C +    elif t - t0 > K: +        t0 = t +        i = 1 +        ans += 1 +    else: +        i += 1 +    if i == C: +        i = 0