def main():

    import sys

    from operator import itemgetter

    from collections import deque

    buf = sys.stdin.buffer

    

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

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

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

    

    bomb_area = deque([])

    bomb_power = deque([])

    total_damage = 0

    ans = 0

    for pos, hp in monsters:

        while bomb_area:

            area = bomb_area[0]

            if area < pos:

                bomb_area.popleft()

                power = bomb_power.popleft()

                total_damage -= power

            else:

                break

        if hp <= total_damage:

            continue

        else:

            count = (hp - total_damage + a - 1) // a

            ans += count

            power = a * count

            total_damage += power

            bomb_area.append(pos + 2 * d)

            bomb_power.append(power)

    print(ans)





if __name__ == '__main__':

    main()

def main():

    import sys

    from operator import itemgetter

    buf = sys.stdin.buffer



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

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

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



    bomb_area = []

    bomb_power = []

    bomb_length = 0

    total_damage = 0

    ans = 0

    idx = 0

    for pos, hp in monsters:

        while idx < bomb_length:

            area = bomb_area[idx]

            if area < pos:

                power = bomb_power[idx]

                total_damage -= power

                idx += 1

            else:

                break

        if hp <= total_damage:

            continue

        else:

            count = (hp - total_damage + a - 1) // a

            ans += count

            power = a * count

            total_damage += power

            bomb_area.append(pos + 2 * d)

            bomb_power.append(power)

            bomb_length += 1

    print(ans)





if __name__ == '__main__':

    main()

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

    buf = sys.stdin.buffer
    n, d, a = list(map(int, buf.readline().split()))
    m = list(map(int, buf.read().split()))
    monsters = sorted(zip(m, m), key=itemgetter(0))
    bomb_area = deque([])
    bomb_power = deque([])
    total_damage = 0
    ans = 0
    for pos, hp in monsters:
        while bomb_area:
            area = bomb_area[0]
            if area < pos:
                bomb_area.popleft()
                power = bomb_power.popleft()
                total_damage -= power
            else:
                break
        if hp <= total_damage:
            continue
        else:
            count = (hp - total_damage + a - 1) // a
            ans += count
            power = a * count
            total_damage += power
            bomb_area.append(pos + 2 * d)
            bomb_power.append(power)
    print(ans)


if __name__ == "__main__":
    main()

def main():
    import sys
    from operator import itemgetter

    buf = sys.stdin.buffer
    n, d, a = list(map(int, buf.readline().split()))
    m = list(map(int, buf.read().split()))
    monsters = sorted(zip(m, m), key=itemgetter(0))
    bomb_area = []
    bomb_power = []
    bomb_length = 0
    total_damage = 0
    ans = 0
    idx = 0
    for pos, hp in monsters:
        while idx < bomb_length:
            area = bomb_area[idx]
            if area < pos:
                power = bomb_power[idx]
                total_damage -= power
                idx += 1
            else:
                break
        if hp <= total_damage:
            continue
        else:
            count = (hp - total_damage + a - 1) // a
            ans += count
            power = a * count
            total_damage += power
            bomb_area.append(pos + 2 * d)
            bomb_power.append(power)
            bomb_length += 1
    print(ans)


if __name__ == "__main__":
    main()

-    from collections import deque -    bomb_area = deque([]) -    bomb_power = deque([]) +    bomb_area = [] +    bomb_power = [] +    bomb_length = 0 +    idx = 0 -        while bomb_area: -            area = bomb_area[0] +        while idx < bomb_length: +            area = bomb_area[idx] -                bomb_area.popleft() -                power = bomb_power.popleft() +                power = bomb_power[idx] +                idx += 1 +            bomb_length += 1