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

main = do
  li <- BS.getLine
  let [n,d,a] = map (read . BS.unpack) $ BS.words li
  co <- BS.getContents
  let xhs = map (map ((\Just (x,_) -> x) . BS.readInt)) $ map BS.words $ BS.lines co
  let ans = compute n d a xhs
  print ans

compute :: Int -> Int -> Int -> [[Int]] -> Int
compute n d a xhs = loop 0 [] (sort xhs)
  where
    d2 = d * 2
    loop n _ [] = n
    loop n ybs ([x,h]:xhs)
      | h1 <= 0 = loop n ybs1 xhs
      | True    = loop (n+k) ((x+d2, a*k):ybs1) xhs
      where
        ybs1 = filter ((x <=).fst) ybs
        h1 = h - sum (map snd ybs1)
        k = (h1 + a - 1) `div` a
