from bisect import bisect_right



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

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

XH.sort()



X = [x for x, _ in XH]



ans = 0

ims = [0] * (N + 1)

cnt = 0



for now, (x, h) in enumerate(XH):

    cnt += ims[now]

    if cnt * A >= h:

        continue

    ness = -(-(h - cnt * A) // A)

    cnt += ness



    i = bisect_right(X, x + D * 2)

    ims[now] += ness

    ims[i] -= ness

    ans += ness



print(ans)
from collections import deque



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

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

XH.sort()



ans = 0

cnt = 0

que = deque()



for x, h in XH:

    while que and que[0][0] <= x:

        cnt -= que.popleft()[1]



    h -= cnt * A



    if h <= 0:

        continue



    ness = -(-h // A)

    cnt += ness

    ans += ness

    que.append((x + 2 * D + 1, ness))



print(ans)

from bisect import bisect_right

N, D, A = list(map(int, input().split()))
XH = [tuple(map(int, input().split())) for _ in range(N)]
XH.sort()
X = [x for x, _ in XH]
ans = 0
ims = [0] * (N + 1)
cnt = 0
for now, (x, h) in enumerate(XH):
    cnt += ims[now]
    if cnt * A >= h:
        continue
    ness = -(-(h - cnt * A) // A)
    cnt += ness
    i = bisect_right(X, x + D * 2)
    ims[now] += ness
    ims[i] -= ness
    ans += ness
print(ans)

from collections import deque

N, D, A = list(map(int, input().split()))
XH = [tuple(map(int, input().split())) for _ in range(N)]
XH.sort()
ans = 0
cnt = 0
que = deque()
for x, h in XH:
    while que and que[0][0] <= x:
        cnt -= que.popleft()[1]
    h -= cnt * A
    if h <= 0:
        continue
    ness = -(-h // A)
    cnt += ness
    ans += ness
    que.append((x + 2 * D + 1, ness))
print(ans)

-from bisect import bisect_right +from collections import deque -X = [x for x, _ in XH] -ims = [0] * (N + 1) -for now, (x, h) in enumerate(XH): -    cnt += ims[now] -    if cnt * A >= h: +que = deque() +for x, h in XH: +    while que and que[0][0] <= x: +        cnt -= que.popleft()[1] +    h -= cnt * A +    if h <= 0: -    ness = -(-(h - cnt * A) // A) +    ness = -(-h // A) -    i = bisect_right(X, x + D * 2) -    ims[now] += ness -    ims[i] -= ness +    que.append((x + 2 * D + 1, ness))