fun main() {
  val (n, d, a) = readLine()!!.split(' ').map { it.toInt() }

  val monsters = Array(n){ _ ->
    val (x, h) = readLine()!!.split(' ').map { it.toLong() }
    Pair(x, (h+a-1)/a)
  }
  monsters.sortBy { it.first }

  val change = LongArray(n+1){0}

  var ans = 0L
  var runningSum = 0L

  for (i in 0 until n){
    runningSum += change[i]
    val currHealth = monsters[i].second - runningSum

    if(currHealth <= 0) continue

    var l = i; var r = n-1
    var pos = -1
    while(l <= r){
      val mid = (r+l)/2
      if(monsters[mid].first <= monsters[i].first + 2L * d){
        pos = mid
        l = mid+1
      }else r = mid - 1
    }

    ans += currHealth
    runningSum += currHealth
    change[pos+1] -= currHealth
  }
  println(ans)
}