import java.util.*

fun main(args:Array<String>){
    val (n,d,a) = readLine()!!.split(" ").map{it.toInt()}
    val x = Array(n){IntArray(2)}
    for(i in 0 until n){
        val (b,c) = readLine()!!.split(" ").map{it.toInt()}
        x[i][0] = b
        x[i][1] = c
    }
    x.sortBy{it -> it[0]}
    var ans = 0L
    var sum = 0L
    val pq = PriorityQueue<Pair<Int,Int>>(n){i1 : Pair<Int,Int>, i2 : Pair<Int,Int> -> return@PriorityQueue i1.first - i2.first}
    for(i in 0 until n){
        while(pq.isNotEmpty() && pq.first().first < x[i][0]){
            sum -= a.toLong() * pq.first().second.toLong()
            pq.remove()
        }
        if(sum < x[i][1]){
            val k = (x[i][1] - sum + a - 1).toLong() / a.toLong()
            sum += k * a.toLong()
            pq.add(Pair(Math.min(x[i][0] + 2 * d, 1000000010).toInt(), k.toInt()))
            ans += k
        }
    }
    println(ans)
}
