import math

from collections import deque

N, D, A = list(map(int, input().split()))

XH = [list(map(int, input().split())) for _ in range(N)]

XH = sorted(XH)

total = 0

D = 2*D

ans = 0

q = deque()

for x, h in XH:

  while len(q) and q[0][0] < x:

    total -= q.popleft()[1] 

  h -= total



  if h > 0:

    num = math.ceil(h/A)

    ans += num

    damage = num*A

    total += damage

    q += [[x+D, damage]]

print(ans)

import math

from collections import deque

N, D, A = list(map(int, input().split()))

XH = [list(map(int, input().split())) for _ in range(N)]

XH = sorted(XH)

ans = 0

total = 0

q = deque([])



for x, h in XH:

  while q and q[0][0] < x:

    total -= q.popleft()[1]

  h -= total



  if h <= 0:

    continue

  attack = math.ceil(h/A)

  damage = attack*A

  total += damage

  q += [[x+2*D, damage]]

  ans += attack



print(ans)

  
import math
from collections import deque

N, D, A = list(map(int, input().split()))
XH = [list(map(int, input().split())) for _ in range(N)]
XH = sorted(XH)
total = 0
D = 2 * D
ans = 0
q = deque()
for x, h in XH:
    while len(q) and q[0][0] < x:
        total -= q.popleft()[1]
    h -= total
    if h > 0:
        num = math.ceil(h / A)
        ans += num
        damage = num * A
        total += damage
        q += [[x + D, damage]]
print(ans)

import math
from collections import deque

N, D, A = list(map(int, input().split()))
XH = [list(map(int, input().split())) for _ in range(N)]
XH = sorted(XH)
ans = 0
total = 0
q = deque([])
for x, h in XH:
    while q and q[0][0] < x:
        total -= q.popleft()[1]
    h -= total
    if h <= 0:
        continue
    attack = math.ceil(h / A)
    damage = attack * A
    total += damage
    q += [[x + 2 * D, damage]]
    ans += attack
print(ans)

+ans = 0 -D = 2 * D -ans = 0 -q = deque() +q = deque([]) -    while len(q) and q[0][0] < x: +    while q and q[0][0] < x: -    if h > 0: -        num = math.ceil(h / A) -        ans += num -        damage = num * A -        total += damage -        q += [[x + D, damage]] +    if h <= 0: +        continue +    attack = math.ceil(h / A) +    damage = attack * A +    total += damage +    q += [[x + 2 * D, damage]] +    ans += attack