import Data.List

main = do
  [_,c,k] <- map read . words <$> getLine
  ts <- sort . map read . words <$> getContents
  print (abus 0 c k ts)

abus acc _ _ [] = acc
abus acc c k tts@(t:ts)
  | x <= c = abus (acc+1) c k (drop x tts)
  | otherwise = abus (acc+1) c k (drop c tts)
  where
    x = length $ takeWhile (<= t+k) ((t+k):ts)