object Main extends App {
  val in = new java.util.Scanner(System.in)
  val N, D, A = in.nextInt
  class Monster(val x: Long, var h: Long)
  val Monsters = Array.fill(N)(new Monster(in.nextLong, in.nextLong)).sortBy(_.x)
  val q = new scala.collection.mutable.Queue[(Long, Long)]

  def attack(i: Int, sum: Long, prevA: Long): Long = {
    if (i == N) sum
    else {
      val m = Monsters(i)
      def checkQ(cur: Long): Long = {
        q.headOption match {
          case None => cur
          case Some((x, a)) => 
            if (x < m.x) {
              q.dequeue
              checkQ(cur - a)
            } else cur
        }
      }
      val newA = checkQ(prevA)

      if (m.h <= newA) attack(i + 1, sum, newA)
      else {
        val attacks = (m.h - newA + A - 1) / A
        q += ((m.x + 2 * D, A * attacks))
        attack(i + 1, sum + attacks, newA + A * attacks)
      }
    }
  }

  println(attack(0, 0L, 0L))
}