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

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    [n,c,k] <- getIntList
    ts <- sort <$> replicateM n getInt
    print $ solve c k ts

solve _ _ [] = 0
solve c k ts | length k1 <= c = 1 + solve c k k2
             | otherwise = 1 + solve c k (drop c ts)
    where t = head ts
          (k1,k2) = span (<=t+k) ts