from bisect import bisect_right

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

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

xh.sort()

x=[]

h=[]

for xx,hh in xh:

  x.append(xx)

  h.append(hh)



not_imos=[0]*(n+1)

atk_n=0

ans=0

for i in range(n):

  atk_n-=not_imos[i]

  h[i]-=atk_n*a

  if h[i]<0:h[i]=0

  atk_i=0--h[i]//a

  ans+=atk_i

  atk_n+=atk_i

  not_imos[bisect_right(x,x[i]+d*2)]+=atk_i

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

d*=2

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

xh.sort()

x=[i for i,j in xh]+[10**20]

h=[j for i,j in xh]

notimos=[0]*(n+1)

c=0

ans=0

from bisect import bisect_right

for i in range(n):

  c+=notimos[i]

  xx,hh=xh[i]

  hh=max(0,hh-c*a)

  m=0--hh//a

  ans+=m

  c+=m

  notimos[bisect_right(x,xx+d)]-=m

print(ans)
from bisect import bisect_right

n, d, a = list(map(int, input().split()))
xh = [list(map(int, input().split())) for _ in range(n)]
xh.sort()
x = []
h = []
for xx, hh in xh:
    x.append(xx)
    h.append(hh)
not_imos = [0] * (n + 1)
atk_n = 0
ans = 0
for i in range(n):
    atk_n -= not_imos[i]
    h[i] -= atk_n * a
    if h[i] < 0:
        h[i] = 0
    atk_i = 0 - -h[i] // a
    ans += atk_i
    atk_n += atk_i
    not_imos[bisect_right(x, x[i] + d * 2)] += atk_i
print(ans)

n, d, a = list(map(int, input().split()))
d *= 2
xh = [list(map(int, input().split())) for _ in range(n)]
xh.sort()
x = [i for i, j in xh] + [10**20]
h = [j for i, j in xh]
notimos = [0] * (n + 1)
c = 0
ans = 0
from bisect import bisect_right

for i in range(n):
    c += notimos[i]
    xx, hh = xh[i]
    hh = max(0, hh - c * a)
    m = 0 - -hh // a
    ans += m
    c += m
    notimos[bisect_right(x, xx + d)] -= m
print(ans)

+n, d, a = list(map(int, input().split())) +d *= 2 +xh = [list(map(int, input().split())) for _ in range(n)] +xh.sort() +x = [i for i, j in xh] + [10**20] +h = [j for i, j in xh] +notimos = [0] * (n + 1) +c = 0 +ans = 0 -n, d, a = list(map(int, input().split())) -xh = [list(map(int, input().split())) for _ in range(n)] -xh.sort() -x = [] -h = [] -for xx, hh in xh: -    x.append(xx) -    h.append(hh) -not_imos = [0] * (n + 1) -atk_n = 0 -ans = 0 -    atk_n -= not_imos[i] -    h[i] -= atk_n * a -    if h[i] < 0: -        h[i] = 0 -    atk_i = 0 - -h[i] // a -    ans += atk_i -    atk_n += atk_i -    not_imos[bisect_right(x, x[i] + d * 2)] += atk_i +    c += notimos[i] +    xx, hh = xh[i] +    hh = max(0, hh - c * a) +    m = 0 - -hh // a +    ans += m +    c += m +    notimos[bisect_right(x, xx + d)] -= m