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