import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Read as T
import Data.List (sort)

main :: IO ()
main = do
  (n : d : a : _) <- map unsafeTextToInt . T.words <$> T.getLine :: IO [Int]
  xhs <- sequence . replicate n $ unsafeListToTuple . map unsafeTextToInt . T.words <$> T.getLine :: IO [(Int, Int)]
  let
    f :: Int -> [(Int, Int)] -> Int
    f c [] = c
    f c ((_, 0) : xhs') = f c xhs'
    f c ((x, h) : xhs') = f c' (pf' ++ sf)
      where
        k = (h + a - 1) `div` a
        c' = c + k
        (pf, sf) = span ((<= x + 2 * d) . fst) xhs'
        pf' = map (fmap (max 0 . subtract (k * a))) pf
  print . f 0 . sort $ xhs

unsafeListToTuple :: [Int] -> (Int, Int)
unsafeListToTuple (x : y : _) = (x, y)

unsafeTextToInt :: T.Text -> Int
unsafeTextToInt s = case T.signed T.decimal s of
  Right (n, _) -> n
