import java.util.ArrayDeque

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 damages = ArrayDeque<Pair<Long, Long>>()

    var ans = 0L
    var nowDamage = 0L

    for (m in mons) {
        while (damages.isNotEmpty()) {
            val (x, cnt) = damages.peek()!!
            if (x + D * 2 < m.first) {
                nowDamage -= cnt * A
                damages.poll()!!
            } else {
                break
            }
        }
        if (nowDamage >= m.second) {
            continue
        } else {
            val cnt = (m.second - nowDamage) / A + if ((m.second - nowDamage) % A != 0L) 1L else 0L
            damages.add(Pair(m.first, cnt))
            nowDamage += cnt * A
            ans += cnt
        }
    }

    println(ans)
}

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