import java.util.*

fun main(args: Array<String>) {
    val (N, D, A) = readInputLine().split(" ").map { it.toLong() }
    val mons = Array(N.toInt()) { val (X, H) = readInputLine().split(" ").map { it.toLong() }; Pair(X, H)}
    mons.sortBy { it.first }

    val poses = mons.map { it.first }

    val damage = LongArray(N.toInt() + 1)

    var ans = 0L

    for ((i, m) in mons.withIndex()) {
        if (i != 0) {
            damage[i] += damage[i - 1]
        }

        if (damage[i] < m.second) {
            val cnt = (m.second - damage[i]) / A + if ((m.second - damage[i]) % A != 0L) 1L else 0L
            damage[i] += cnt * A
            damage[upperBound(poses, m.first + D * 2)] -= cnt * A
            ans += cnt
        }
    }

    println(ans)
}

fun readInputLine(): String {
    return readLine()!!
}

fun <T: Comparable<T>> upperBound(list: List<T>, value: T): Int {
    return Collections.binarySearch(list, value, {x, y -> if (x > y) 1 else -1}).inv()
}