from collections import deque





n, d, a = list(map(int, input().split()))

monsters = []

for _ in range(n):

    pos, hp = list(map(int, input().split()))

    monsters.append([pos, hp])



monsters.sort()



bomb_area = deque([])

bomb_power = deque([])

total_damage = 0

ans = 0

for pos, hp in monsters:

    while bomb_area:

        area = bomb_area[0]

        if area < pos:

            bomb_area.popleft()

            power = bomb_power.popleft()

            total_damage -= power

        else:

            break

    if hp <= total_damage:

        continue

    else:

        count = (hp-total_damage + a-1) // a

        ans += count

        power = a * count

        total_damage += power

        bomb_area.append(pos+2*d)

        bomb_power.append(power)



print(ans)
from collections import deque

import sys

input = sys.stdin.readline





n, d, a = list(map(int, input().split()))

monsters = []

for _ in range(n):

    pos, hp = list(map(int, input().split()))

    monsters.append([pos, hp])



monsters.sort()



bomb_area = deque([])

bomb_power = deque([])

total_damage = 0

ans = 0

for pos, hp in monsters:

    while bomb_area:

        area = bomb_area[0]

        if area < pos:

            bomb_area.popleft()

            power = bomb_power.popleft()

            total_damage -= power

        else:

            break

    if hp <= total_damage:

        continue

    else:

        count = (hp-total_damage + a-1) // a

        ans += count

        power = a * count

        total_damage += power

        bomb_area.append(pos+2*d)

        bomb_power.append(power)



print(ans)
from collections import deque

n, d, a = list(map(int, input().split()))
monsters = []
for _ in range(n):
    pos, hp = list(map(int, input().split()))
    monsters.append([pos, hp])
monsters.sort()
bomb_area = deque([])
bomb_power = deque([])
total_damage = 0
ans = 0
for pos, hp in monsters:
    while bomb_area:
        area = bomb_area[0]
        if area < pos:
            bomb_area.popleft()
            power = bomb_power.popleft()
            total_damage -= power
        else:
            break
    if hp <= total_damage:
        continue
    else:
        count = (hp - total_damage + a - 1) // a
        ans += count
        power = a * count
        total_damage += power
        bomb_area.append(pos + 2 * d)
        bomb_power.append(power)
print(ans)

from collections import deque
import sys

input = sys.stdin.readline
n, d, a = list(map(int, input().split()))
monsters = []
for _ in range(n):
    pos, hp = list(map(int, input().split()))
    monsters.append([pos, hp])
monsters.sort()
bomb_area = deque([])
bomb_power = deque([])
total_damage = 0
ans = 0
for pos, hp in monsters:
    while bomb_area:
        area = bomb_area[0]
        if area < pos:
            bomb_area.popleft()
            power = bomb_power.popleft()
            total_damage -= power
        else:
            break
    if hp <= total_damage:
        continue
    else:
        count = (hp - total_damage + a - 1) // a
        ans += count
        power = a * count
        total_damage += power
        bomb_area.append(pos + 2 * d)
        bomb_power.append(power)
print(ans)

+import sys +input = sys.stdin.readline