import Control.Monad
import qualified Data.ByteString.Char8 as BS
import Data.List
import Data.Maybe

readInt = fst . fromJust . BS.readInt

readIntList = map readInt . BS.words

getIntList = readIntList <$> BS.getLine

getIntListN n = map readInt <$> replicateM (fromIntegral n) BS.getLine

calc ts c k i
  | length ts == 0 = i
  | otherwise = calc ts'' c k i'
  where
    t = head ts
    (xs, ts') = partition (<= t + k) ts
    n = maximum [(length xs) `div` c, 1]
    i' = i + n
    ts'' = (drop (n * c) xs) ++ ts'

main = do
  [n, c, k] <- getIntList
  ts <- getIntListN n
  let ts' = sort ts
  print $ calc ts' c k 0
