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

main=do
    [n,c,k]<-map read.words<$>getLine
    ts<-sort <$> replicateM n (fst.fromJust.B.readInt<$>B.getLine)
    let ks = map (+k) ts
    print $ sol 0 0 c ts ks

sol n w c [] _ = n+(w+c-1)`div`c
sol n 0 c (t:ts) (k:ks) = sol n 1 c ts (k:ks) 
sol n w c (t:ts) (k:ks)
    | w == c = sol (n+1) 0 c (t:ts) $ drop c (k:ks)
    | k >= t = sol n (w+1) c ts (k:ks)
    | otherwise = sol (n+1) 0 c (t:ts) $ drop w (k:ks)