output_description: Print the minimum number of bombs needed to win.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N D A
      X_1 H_1
      :
      X_N H_N
attempt: def examA():
      H, A = LI()
      ans = (H - 1) // A + 1
      print(ans)
      return
  
  
  def examB():
      H, N = LI()
      A = LI()
      if H > sum(A):
          print("No")
      else:
          print("Yes")
      return
  
  
  def examC():
      N, K = LI()
      H = LI()
      H.sort()
      ans = sum(H[: max(0, N - K)])
      print(ans)
      return
  
  
  def examD():
      H = I()
      ans = 2 ** (H.bit_length()) - 1
      print(ans)
      return
  
  
  def examE():
      H, N = LI()
      A = [0] * N
      B = [0] * N
      V = [[] for _ in range(N)]
      for i in range(N):
          A[i], B[i] = LI()
          V[i] = [A[i], B[i], A[i] / B[i]]
      V.sort(key=lambda x: x[2], reverse=True)
      dp = [[inf] * (H + 1) for _ in range(N + 1)]
      dp[0][0] = 0
      for i in range(N):
          for j in range(H):
              dp[i + 1][j] = min(dp[i + 1][j], dp[i][j])
              if j <= H - V[i][0]:
                  dp[i + 1][j + V[i][0]] = min(dp[i + 1][j + V[i][0]], dp[i][j] + V[i][1])
              else:
                  dp[i + 1][H] = min(dp[i + 1][H], dp[i][j] + V[i][1])
      loop = (H - 1) // V[0][0] + 1
      ans = [0] * loop
      for i in range(loop):
          curH = H - V[0][0] * i
          ans[i] = i * V[0][1] + min(dp[N][curH:])
      print(ans)
      #    print(dp)
      print(min(ans))
      return
  
  
  def examF():
      class SegmentTree:
          def __init__(self, n, ele, segfun):
              #####単位元######要設定0or1orinf
              self.ide_ele = ele
              self.segfun = segfun
              ####################
              self.n = n
              self.N0 = 1 << n.bit_length()
              self.data = [self.ide_ele] * (self.N0 * 2)
  
          def update_add(self, l, r, val):
              l += self.N0
              r += self.N0
              while l < r:
                  if l & 1:
                      self.data[l] += val
                      l += 1
                  if r & 1:
                      self.data[r - 1] += val
                      r -= 1
                  l //= 2
                  r //= 2
  
          def update(self, l, r, val):
              l += self.N0
              r += self.N0
              while l < r:
                  if l & 1:
                      self.data[l] = self.segfun(self.data[l], val)
                      l += 1
                  if r & 1:
                      self.data[r - 1] = self.segfun(self.data[r - 1], val)
                      r -= 1
                  l //= 2
                  r //= 2
  
          def query(self, i):
              i += len(self.data) // 2
              ret = self.data[i]
              while i > 0:
                  i //= 2
                  ret = self.segfun(ret, self.data[i])
              return ret
  
      N, D, A = LI()
      XH = [LI() for _ in range(N)]
      XH.sort(key=lambda x: x[0])
      X = [0] * N
      for i in range(N):
          X[i] = XH[i][0]
      S = SegmentTree(N, 0, lambda a, b: a + b)
      ans = 0
      for i in range(N):
          cur = (XH[i][1] - 1) // A + 1
          cur -= S.query(i)
          now = bisect.bisect_right(X, X[i] + D * 2)
          #        print(now)
          S.update_add(i, now, cur)
          ans += cur
      print(ans)
      return
  
  
  import sys, copy, bisect, itertools, heapq, math
  from heapq import heappop, heappush, heapify
  from collections import Counter, defaultdict, deque
  
  
  def I():
      return int(sys.stdin.readline())
  
  
  def LI():
      return list(map(int, sys.stdin.readline().split()))
  
  
  def LSI():
      return list(map(str, sys.stdin.readline().split()))
  
  
  def LS():
      return sys.stdin.readline().split()
  
  
  def SI():
      return sys.stdin.readline().strip()
  
  
  global mod, mod2, inf, alphabet
  mod = 10**9 + 7
  mod2 = 998244353
  inf = 10**18
  alphabet = [chr(ord("a") + i) for i in range(26)]
  
  if __name__ == "__main__":
      examF()
  
  """
  
  """
  
problem_description: Statement
  
  Silver Fox is fighting with N monsters.
  
  The monsters are standing in a row, and we can assume them to be standing on a
  number line. The i-th monster, standing at the coordinate X_i, has the
  _health_ of H_i.
  
  Silver Fox can use bombs to attack the monsters. Using a bomb at the
  coordinate x decreases the healths of all monsters between the coordinates x-D
  and x+D (inclusive) by A. There is no way other than bombs to decrease the
  monster's health.
  
  Silver Fox wins when all the monsters' healths become 0 or below.
  
  Find the minimum number of bombs needed to win.
samples: [{"input": "3 3 2\n    1 2\n    5 4\n    9 2", "output": "2\n    \n\nFirst, let us use a bomb at the coordinate 4 to decrease the first and second\nmonsters' health by 2.\n\nThen, use a bomb at the coordinate 6 to decrease the second and third\nmonsters' health by 2.\n\nNow, all the monsters' healths are 0. We cannot make all the monsters' health\ndrop to 0 or below with just one bomb.\n\n* * *"}, {"input": "9 4 1\n    1 5\n    2 4\n    3 3\n    4 2\n    5 1\n    6 2\n    7 3\n    8 4\n    9 5", "output": "5\n    \n\nWe should use five bombs at the coordinate 5.\n\n* * *"}, {"input": "3 0 1\n    300000000 1000000000\n    100000000 1000000000\n    200000000 1000000000", "output": "3000000000\n    \n\nWatch out for overflow."}]