def main():

    from bisect import bisect_left

    from operator import itemgetter



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



    xh = []

    xs = set()

    for _ in range(N):

        x, h = list(map(int, input().split()))

        xh.append((x, h))

        xs.add(x)

        xs.add(x + D)

        xs.add(x + D * 2)



    xh.sort(key=itemgetter(0), reverse=True)



    *xs, = sorted(xs)



    imos = [0] * (len(xs) + 10)

    mons = [0] * (len(xs) + 10)

    for x, h in xh:

        i = bisect_left(xs, x)

        mons[i] += h



    ret = 0

    for i in range(len(xs) + 1):

        d = (mons[i] - imos[i] + A - 1) // A

        if d > 0:

            ret += d

            imos[i] += d * A

            imos[bisect_left(xs, xs[i] + D * 2) + 1] -= d * A

        imos[i + 1] += imos[i]



    print(ret)





if __name__ == '__main__':

    main()



# import sys

#

# sys.setrecursionlimit(10 ** 7)

#

# input = sys.stdin.readline

# rstrip()

# int(input())

# map(int, input().split())

def main():

    from collections import namedtuple

    from operator import attrgetter

    import sys

    readline = sys.stdin.readline



    mon = namedtuple('mon', 'x h')



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

    mons = []

    for _ in range(N):

        x, h = list(map(int, readline().split()))

        mons.append(mon(x=x, h=h))

    mons.sort(key=attrgetter('x'))



    imos = [0] * (N + 1)



    bomb = 0

    j = 0

    for i, mon in enumerate(mons):

        while (j + 1 < N) and (mons[j + 1].x - mon.x) <= D * 2:

            j += 1

        count = max(0, (mon.h - imos[i] * A + A - 1) // A)

        bomb += count



        imos[i] += count

        imos[j + 1] -= count



        imos[i + 1] += imos[i]



    print(bomb)





if __name__ == '__main__':

    main()

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

    N, D, A = list(map(int, input().split()))
    xh = []
    xs = set()
    for _ in range(N):
        x, h = list(map(int, input().split()))
        xh.append((x, h))
        xs.add(x)
        xs.add(x + D)
        xs.add(x + D * 2)
    xh.sort(key=itemgetter(0), reverse=True)
    (*xs,) = sorted(xs)
    imos = [0] * (len(xs) + 10)
    mons = [0] * (len(xs) + 10)
    for x, h in xh:
        i = bisect_left(xs, x)
        mons[i] += h
    ret = 0
    for i in range(len(xs) + 1):
        d = (mons[i] - imos[i] + A - 1) // A
        if d > 0:
            ret += d
            imos[i] += d * A
            imos[bisect_left(xs, xs[i] + D * 2) + 1] -= d * A
        imos[i + 1] += imos[i]
    print(ret)


if __name__ == "__main__":
    main()
# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())

def main():
    from collections import namedtuple
    from operator import attrgetter
    import sys

    readline = sys.stdin.readline
    mon = namedtuple("mon", "x h")
    N, D, A = list(map(int, readline().split()))
    mons = []
    for _ in range(N):
        x, h = list(map(int, readline().split()))
        mons.append(mon(x=x, h=h))
    mons.sort(key=attrgetter("x"))
    imos = [0] * (N + 1)
    bomb = 0
    j = 0
    for i, mon in enumerate(mons):
        while (j + 1 < N) and (mons[j + 1].x - mon.x) <= D * 2:
            j += 1
        count = max(0, (mon.h - imos[i] * A + A - 1) // A)
        bomb += count
        imos[i] += count
        imos[j + 1] -= count
        imos[i + 1] += imos[i]
    print(bomb)


if __name__ == "__main__":
    main()

-    from bisect import bisect_left -    from operator import itemgetter +    from collections import namedtuple +    from operator import attrgetter +    import sys -    N, D, A = list(map(int, input().split())) -    xh = [] -    xs = set() +    readline = sys.stdin.readline +    mon = namedtuple("mon", "x h") +    N, D, A = list(map(int, readline().split())) +    mons = [] -        x, h = list(map(int, input().split())) -        xh.append((x, h)) -        xs.add(x) -        xs.add(x + D) -        xs.add(x + D * 2) -    xh.sort(key=itemgetter(0), reverse=True) -    (*xs,) = sorted(xs) -    imos = [0] * (len(xs) + 10) -    mons = [0] * (len(xs) + 10) -    for x, h in xh: -        i = bisect_left(xs, x) -        mons[i] += h -    ret = 0 -    for i in range(len(xs) + 1): -        d = (mons[i] - imos[i] + A - 1) // A -        if d > 0: -            ret += d -            imos[i] += d * A -            imos[bisect_left(xs, xs[i] + D * 2) + 1] -= d * A +        x, h = list(map(int, readline().split())) +        mons.append(mon(x=x, h=h)) +    mons.sort(key=attrgetter("x")) +    imos = [0] * (N + 1) +    bomb = 0 +    j = 0 +    for i, mon in enumerate(mons): +        while (j + 1 < N) and (mons[j + 1].x - mon.x) <= D * 2: +            j += 1 +        count = max(0, (mon.h - imos[i] * A + A - 1) // A) +        bomb += count +        imos[i] += count +        imos[j + 1] -= count -    print(ret) +    print(bomb) -# import sys -# -# sys.setrecursionlimit(10 ** 7) -# -# input = sys.stdin.readline -# rstrip() -# int(input()) -# map(int, input().split())