fun main(args: Array<String>) {
    var (N, D, A) = listOfInt()
    var XH = Array(N) {
        var (x, h)= listOfLong()
        x to (h + A - 1) / A
    }.sortedBy { it.first }
    val q = Queue<Pair<Long, Long>>()
    var ans = 0L
    var num = 0L
    repeat (N) {
        var (x, h) = XH[it]
        while (!q.isEmpty() && q.first().first < x) {
            num -= q.dequeue()!!.second
        }
        h -= num
        if (h > 0) {
            ans += h
            num += h
            q.enqueue(x + D * 2 to h)
        }
    }
    println(ans)
}
fun next() = readLine()!!
fun listOfString() = next().split(" ")
fun listOfLong() = listOfString().map(String::toLong)
fun listOfInt() = listOfString().map(String::toInt)
class Queue<T> {
    val elements = mutableListOf<T>()
    fun isEmpty() = elements.isEmpty()
    fun first() = elements[0]
    fun enqueue(item: T) = elements.add(item)
    fun dequeue() = if (!isEmpty()) elements.removeAt(0) else null
}