import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val N = sc.nextInt()
    val D = sc.nextLong()
    val A = sc.nextLong()
    val X = mutableListOf<Long>()
    val H = mutableListOf<Long>()
    (1..N)
            .map { Pair(sc.nextLong(), sc.nextLong()) }
            .sortedWith(Comparator { a, b -> if (a.first < b.first) -1 else 1 })
            .forEach { p -> X.add(p.first); H.add(p.second) }
    var ans = 0L
    var count = 0L
    val minus = Array(N + 1) { 0L }
    repeat(N) {
        count -= minus[it]
        val rem = (H[it] - count * A + A - 1) / A
        if (rem > 0) {
            var idx = X.binarySearch(X[it] + D * 2 + 1, it)
            if (idx < 0) {
                idx = idx.inv()
            }
            minus[idx] += rem
            count += rem
            ans += rem
        }
    }
    println(ans)
}
