{-# LANGUAGE BangPatterns #-}

import Control.Monad
import Data.List

main = do
  li <- getLine
  let [n,d,a] = map read $ words li
  xhs <- forM [1..n] (\_ -> do
    li <- getLine
    let [x,h] = map read $ words li
    return (x,h)
    )
  let ans = compute n d a xhs
  print ans

compute :: Int -> Int -> Int -> [(Int,Int)] -> Int
compute n d a xhs = loop 0 (sort xhs)
  where
    d2 = d * 2
    loop n [] = n
    loop !n ((x,h):xhs) = loop (n+k) (xhs1a ++ xhs2)
      where
        k = (h + a - 1) `div` a
        ak = a * k
        xhs1 = takeWhile ((<= x + d2).fst) xhs
        xhs2 = drop (length xhs1) xhs
        xhs1a = [ (x1, h1 - ak) | (x1,h1) <- xhs1, h1 > ak ]
