import Data.List (sort)

main :: IO ()
main = interact $ format . solve . parse

parse :: String -> (Int, Int, Int, [(Int, Int)])
parse input = (n, d, a, xh) where
    lns = lines input
    [n, d, a] = map read . words . head $ lns
    xh = map (tuple2 . map read . words) . take n . tail $ lns
    tuple2 [x, y] = (x, y)

solve :: (Int, Int, Int, [(Int, Int)]) -> Int
solve (n, d, a, xh) = subsolve $ sort xh where
    subsolve [] = 0
    subsolve ((x, h): tl) = cnt + (subsolve $ filter ((> 0) . snd) $ map bomb tl) where
        cnt = - div (-h) a
        bomb (x', h') = if x' <= x + 2 * d then (x', h' - cnt * a) else (x', h')

format :: Int -> String
format = (++ "\n") . show
