import java.util.*

data class Data(
  val x: Long,
  val n: Long // 必要な攻撃回数
) : Comparable<Data> {
  override fun compareTo(other: Data): Int {
    if (other.x == this.x) return this.n.compareTo(other.n)
    return this.x.compareTo(other.x)
  }
}

fun main(args: Array<String>) {
  val (N, D, A) = readInts()
  val XH = (1..N).map { readLongs() }

  val queue: Queue<Data> = PriorityQueue<Data>(N)
  XH.forEach {
    queue.add(Data(x = it[0], n = (it[1] + A - 1) / A))
  }

  var cnt = 0L
  var d = 0L
  while (!queue.isEmpty()) {
    val e = queue.remove()
//    println(e)
    if (e.n < 0) {
      d += e.n
      continue
    }
    val tmp = Math.max(e.n - d, 0)
    if (tmp == 0L) continue
    cnt += tmp
    d += tmp
    queue.add(Data(x = e.x + D * 2 + 1, n = -tmp))
  }

  println(cnt)
}

fun readString() = readLine()!!
fun readStrings() = readString().split(" ")
fun readInt() = readString().toInt()
fun readInts() = readStrings().map { it.toInt() }
fun readLong() = readString().toLong()
fun readLongs() = readStrings().map { it.toLong() }
