import sys

from bisect import bisect_right



read = sys.stdin.read



N, D, A, *XH = list(map(int, read().split()))

X = XH[::2] + [-1]

H = XH[1::2] + [-1]

D *= 2

X, H = list(zip(*sorted(zip(X, H))))



damages = [0] * (N + 2)

answer = 0



for i in range(1, N + 1):

    damages[i] += damages[i - 1]

    h = H[i]

    if damages[i] >= h:

        continue

    else:

        h -= damages[i]



    x = X[i]

    cnt = (h + A - 1) // A

    answer += cnt

    damage = A * cnt

    damages[i] += damage

    damages[bisect_right(X, x + D)] -= damage



print(answer)

import sys

from bisect import bisect_right

from operator import itemgetter



read = sys.stdin.read



N, D, A, *XH = list(map(int, read().split()))

XH = sorted(zip(*[iter(XH)] * 2), key=itemgetter(0))

D *= 2

X = [i for i, _ in XH]



damages = [0] * (N + 2)

answer = 0



for i, (x, h) in enumerate(XH, 1):

    damages[i] += damages[i - 1]

    if damages[i] >= h:

        continue



    h -= damages[i]

    cnt = (h + A - 1) // A

    answer += cnt

    damage = A * cnt

    damages[i] += damage

    damages[bisect_right(X, x + D) + 1] -= damage



print(answer)

import sys
from bisect import bisect_right

read = sys.stdin.read
N, D, A, *XH = list(map(int, read().split()))
X = XH[::2] + [-1]
H = XH[1::2] + [-1]
D *= 2
X, H = list(zip(*sorted(zip(X, H))))
damages = [0] * (N + 2)
answer = 0
for i in range(1, N + 1):
    damages[i] += damages[i - 1]
    h = H[i]
    if damages[i] >= h:
        continue
    else:
        h -= damages[i]
    x = X[i]
    cnt = (h + A - 1) // A
    answer += cnt
    damage = A * cnt
    damages[i] += damage
    damages[bisect_right(X, x + D)] -= damage
print(answer)

import sys
from bisect import bisect_right
from operator import itemgetter

read = sys.stdin.read
N, D, A, *XH = list(map(int, read().split()))
XH = sorted(zip(*[iter(XH)] * 2), key=itemgetter(0))
D *= 2
X = [i for i, _ in XH]
damages = [0] * (N + 2)
answer = 0
for i, (x, h) in enumerate(XH, 1):
    damages[i] += damages[i - 1]
    if damages[i] >= h:
        continue
    h -= damages[i]
    cnt = (h + A - 1) // A
    answer += cnt
    damage = A * cnt
    damages[i] += damage
    damages[bisect_right(X, x + D) + 1] -= damage
print(answer)

+from operator import itemgetter -X = XH[::2] + [-1] -H = XH[1::2] + [-1] +XH = sorted(zip(*[iter(XH)] * 2), key=itemgetter(0)) -X, H = list(zip(*sorted(zip(X, H)))) +X = [i for i, _ in XH] -for i in range(1, N + 1): +for i, (x, h) in enumerate(XH, 1): -    h = H[i] -    else: -        h -= damages[i] -    x = X[i] +    h -= damages[i] -    damages[bisect_right(X, x + D)] -= damage +    damages[bisect_right(X, x + D) + 1] -= damage