fun main(args: Array<String>) {
    val (N, D, A) = readLongList()
    val list = Array(N.toInt()) { readLongList().toPair() }.sortedBy { it.first }
    var ans = 0L
    var d = 0L
    var dmg = mutableListOf<Pair<Long, Long>>()

    for ((x, h) in list) {
        while (!dmg.isEmpty()) {
            val e = dmg.first()
            if (e.first >= x) break
            d -= e.second
            dmg.removeAt(0)
        }

        if (h > d) {
            val n = (h - d + A - 1) / A
            dmg.add(x + 2 * D to A * n)
            d += A*n
            ans += n
        }
    }

    println(ans)
}

fun readString() = readLine()!!
fun readStringList() = readLine()!!.split(" ")
fun readInt() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readIntList() = readLine()!!.split(" ").map(String::toInt)
fun readLongList() = readLine()!!.split(" ").map(String::toLong)

fun <E> List<E>.toPair() = this[0] to this[1]
