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

main :: IO ()
main = do
  (n : d : a : _) <- map unsafeTextToInt . T.words <$> T.getLine :: IO [Int]
  let
    -- walk :: Int -> Int -> [(Int, Int)] -> [(Int, Int)] -> [(Int, Int)]
    {-
    walk _ _ [] _ = []
    walk l c ((x, h) : xhs') yks = (x, k') : walk (succ l') (c' + k') xhs' yks'
      where
        (s, t) = splitAt l yks
        (u, v) = span ((< x - 2 * d) . fst) s
        (l', c') = (,) <$> flip subtract l . length <*> flip subtract c . sum . map snd $ u
        k' = (max 0 (h - c' * a) + a - 1) `div` a
        yks' = v ++ t
    -}
    
    {-
    walk _ _ [] _ = []
    walk l c ((x, h) : xhs') yks = (x, k') : walk (succ (l - l')) ((c - c') + k') xhs' yks'
      where
        v = take l yks
        u = takeWhile ((< x - 2 * d) . fst) v
        (l', c') = (,) <$> length <*> sum . map snd $ u
        k' = (max 0 (h - (c - c') * a) + a - 1) `div` a
        yks' = drop l' yks
    -}
    
    walk :: [(Int, Int)] -> [(Int, Int)] -> [(Int, Int)]
    walk = fmap (snd .) $ flip $ mapAccumL step . (,) (0, 0)
      where
        step ((l, c), yks) (x, h) = (((succ (l - l'), c - c' + k'), yks'), (x, k'))
          where
            v = take l yks
            u = takeWhile ((< x - 2 * d) . fst) v
            (l', c') = (,) <$> length <*> sum . map snd $ u
            k' = (max 0 (h - (c - c') * a) + a - 1) `div` a
            yks' = drop l' yks
    
  xhs <- sequence . replicate n $ unsafeListToTuple . map unsafeTextToInt . T.words <$> T.getLine :: IO [(Int, Int)]
  -- print . sum . map snd . fix . walk 0 0 . sort $ xhs
  print . sum . map snd . fix . walk . sort $ xhs

fix :: (a -> a) -> a
fix f = x
  where
    x = f x

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
