import Control.Monad
import Data.List
main = do
  [n,c,k] <- map read . words <$> getLine
  (t:ts) <- sort <$> replicateM n (read <$> getLine) 
  let 
    f x y [] = 1
    f x y (z:zs)
      | x==0 || z-y>k = 1 + f (c-1) z zs
      | otherwise = f (x-1) y zs
  print $ f c t ts