def main():

    def bisect(a,x):

        ok=len(a)

        ng=-1

        while ok-ng>1:

            mid=(ok+ng)//2

            if a[mid]>x:ok=mid

            else:ng=mid

        return ok

    import sys

    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 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():
    def bisect(a, x):
        ok = len(a)
        ng = -1
        while ok - ng > 1:
            mid = (ok + ng) // 2
            if a[mid] > x:
                ok = mid
            else:
                ng = mid
        return ok

    import sys
    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 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 bisect(a, x): -        ok = len(a) -        ng = -1 -        while ok - ng > 1: -            mid = (ok + ng) // 2 -            if a[mid] > x: -                ok = mid -            else: -                ng = mid -        return ok - +    from bisect import bisect