import java.util.*

fun main(args: Array<String>) {
    val (N, D, A) = readLine()!!.split(" ").map(String::toInt)
    val XH = (1..N).map { readLine()!!.split(" ")}.map { e -> MutablePair(e[0].toInt(), e[1].toLong()) }.sortedBy { it.x }
    var ans = 0L
    var totalDamage = 0L
    val que = ArrayDeque<Pair<Int, Long>>()
    for (enemy in XH) {
        while (que.isNotEmpty() && que.last.first <= enemy.x) {
            totalDamage -= que.removeLast().second
        }
        enemy.h -= totalDamage
        if (enemy.h > 0) {
            val num = (enemy.h + A - 1) / A
            val damage = A * num
            que.addFirst(Pair(enemy.x + D * 2 + 1, damage))
            totalDamage += damage
            ans += num
        }
    }
    println(ans)
}

class MutablePair(val x: Int, var h: Long)