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=b=0

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

        c[i]+=b

        b=c[i]

        h-=b

        t=-h//a

        if t<0:

            b-=t*a

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

            s-=t

    print(s)

main()
def main():

    import sys

    from collections import deque

    from operator import itemgetter

    b=sys.stdin.buffer

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

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

    p,q=deque(),deque()

    f,g=p.popleft,q.popleft

    s=b=0

    for x,h in sorted(zip(m,m),key=itemgetter(0)):

        while p and p[0]<x:

            f()

            b-=g()

        h-=b

        t=0--h//a

        if t>0:

            s+=t

            b+=t*a

            p+=x+d+d,

            q+=t*a,

    print(s)

main()
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 = b = 0
    for i, (x, h) in enumerate(z):
        c[i] += b
        b = c[i]
        h -= b
        t = -h // a
        if t < 0:
            b -= t * a
            c[bisect(y, x + d + d)] += t * a
            s -= t
    print(s)


main()

def main():
    import sys
    from collections import deque
    from operator import itemgetter

    b = sys.stdin.buffer
    n, d, a = list(map(int, b.readline().split()))
    m = list(map(int, b.read().split()))
    p, q = deque(), deque()
    f, g = p.popleft, q.popleft
    s = b = 0
    for x, h in sorted(zip(m, m), key=itemgetter(0)):
        while p and p[0] < x:
            f()
            b -= g()
        h -= b
        t = 0 - -h // a
        if t > 0:
            s += t
            b += t * a
            p += (x + d + d,)
            q += (t * a,)
    print(s)


main()

-    from bisect import bisect +    from collections import deque -    c = [0] * (n + 1) -    z = sorted(zip(m, m), key=itemgetter(0)) -    y = [x for x, _ in z] +    p, q = deque(), deque() +    f, g = p.popleft, q.popleft -    for i, (x, h) in enumerate(z): -        c[i] += b -        b = c[i] +    for x, h in sorted(zip(m, m), key=itemgetter(0)): +        while p and p[0] < x: +            f() +            b -= g() -        t = -h // a -        if t < 0: -            b -= t * a -            c[bisect(y, x + d + d)] += t * a -            s -= t +        t = 0 - -h // a +        if t > 0: +            s += t +            b += t * a +            p += (x + d + d,) +            q += (t * a,)