from bisect import*

n,d,a,*t=list(map(int,open(0).read().split()))

c=[0]*-~n

z=sorted(zip(*[iter(t)]*2))

s=0

for i,(x,h)in enumerate(z):

    c[i]+=c[i-1]

    h-=c[i]

    t=min(-h//a,0)

    c[i]-=t*a

    c[bisect(z,(x+d+d,9e9))]+=t*a

    s-=t

print(s)
def main():

    import sys

    from bisect import bisect

    from operator import itemgetter

    b=sys.stdin.buffer

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

    m=list(map(int,b.read().split()))

    c=[0]*(n+1)

    z=sorted(zip(m,m),key=itemgetter(0))

    y=[x for x,_ in z]

    s=0

    for i,(x,h)in enumerate(z):

        c[i]+=c[i-1]

        h-=c[i]

        t=-h//a

        if t>0:t=0

        c[i]-=t*a

        c[bisect(y,x+d+d)]+=t*a

        s-=t

    print(s)

main()
from bisect import *

n, d, a, *t = list(map(int, open(0).read().split()))
c = [0] * -~n
z = sorted(zip(*[iter(t)] * 2))
s = 0
for i, (x, h) in enumerate(z):
    c[i] += c[i - 1]
    h -= c[i]
    t = min(-h // a, 0)
    c[i] -= t * a
    c[bisect(z, (x + d + d, 9e9))] += t * a
    s -= t
print(s)

def main():
    import sys
    from bisect import bisect
    from operator import itemgetter

    b = sys.stdin.buffer
    n, d, a = list(map(int, b.readline().split()))
    m = list(map(int, b.read().split()))
    c = [0] * (n + 1)
    z = sorted(zip(m, m), key=itemgetter(0))
    y = [x for x, _ in z]
    s = 0
    for i, (x, h) in enumerate(z):
        c[i] += c[i - 1]
        h -= c[i]
        t = -h // a
        if t > 0:
            t = 0
        c[i] -= t * a
        c[bisect(y, x + d + d)] += t * a
        s -= t
    print(s)


main()

-from bisect import * +def main(): +    import sys +    from bisect import bisect +    from operator import itemgetter -n, d, a, *t = list(map(int, open(0).read().split())) -c = [0] * -~n -z = sorted(zip(*[iter(t)] * 2)) -s = 0 -for i, (x, h) in enumerate(z): -    c[i] += c[i - 1] -    h -= c[i] -    t = min(-h // a, 0) -    c[i] -= t * a -    c[bisect(z, (x + d + d, 9e9))] += t * a -    s -= t -print(s) +    b = sys.stdin.buffer +    n, d, a = list(map(int, b.readline().split())) +    m = list(map(int, b.read().split())) +    c = [0] * (n + 1) +    z = sorted(zip(m, m), key=itemgetter(0)) +    y = [x for x, _ in z] +    s = 0 +    for i, (x, h) in enumerate(z): +        c[i] += c[i - 1] +        h -= c[i] +        t = -h // a +        if t > 0: +            t = 0 +        c[i] -= t * a +        c[bisect(y, x + d + d)] += t * a +        s -= t +    print(s) + + +main()