#include <algorithm>
#include <bits/stdc++.h>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <iostream>
#include <iterator>
#include <type_traits>
#include <vector>

// lib/detail/ceil_and_floor.hpp
#ifndef DETAIL_CEIL_AND_FLOOR_HPP
#define DETAIL_CEIL_AND_FLOOR_HPP

namespace tools {
  template <typename T>
  constexpr T floor(T lhs, T rhs);

  template <typename T>
  constexpr T ceil(T lhs, T rhs);

  template <typename T>
  constexpr T floor(const T lhs, const T rhs) {
    return
      lhs >= 0 && rhs >= 0 ?
        lhs / rhs :
      lhs < 0 && rhs >= 0 ?
        -ceil<T>(-lhs, rhs) :
      lhs >= 0 && rhs < 0 ?
        -ceil<T>(lhs, -rhs) :
        floor<T>(-lhs, -rhs);
  }

  template <typename T>
  constexpr T ceil(const T lhs, const T rhs) {
    return
      lhs >= 0 && rhs >= 0 ?
        (lhs - 1 + rhs) / rhs :
      lhs < 0 && rhs >= 0 ?
        -floor<T>(-lhs, rhs) :
      lhs >= 0 && rhs < 0 ?
        -floor<T>(lhs, -rhs) :
        ceil<T>(-lhs, -rhs);
  }
}

#endif

// lib/ceil_log2.hpp
#ifndef CEIL_LOG2_HPP
#define CEIL_LOG2_HPP


namespace tools {
  ::std::uint32_t ceil_log2(::std::uint32_t x);
  ::std::uint64_t ceil_log2(::std::uint64_t x);
  ::std::int32_t ceil_log2(::std::int32_t x);
  ::std::int64_t ceil_log2(::std::int64_t x);
}

#endif

// lib/less_by.hpp
#ifndef LESS_BY_HPP
#define LESS_BY_HPP


/*
usage:

std::sort(a.begin(), a.end(), tools::less_by([](int a_i) { return std::abs(x); }));
*/

namespace tools {
  template <class T, class R>
  class less_by {
  private:
    ::std::function<R(T)> selector;

  public:
    less_by(const ::std::function<R(T)>& selector) : selector(selector) {
    }

    bool operator()(const T& x, const T& y) const {
      return selector(x) < selector(y);
    }

    using first_argument_type = T;
    using second_argument_type = T;
    using result_type = bool;
  };
}

#endif

// lib/pow2.hpp
#ifndef POW2_HPP
#define POW2_HPP

/*
usage:

tools::pow2(5) => 32
*/


namespace tools {
  template <typename T, typename std::enable_if<std::is_unsigned<T>::value, std::nullptr_t>::type = nullptr>
  constexpr T pow2(const T x) {
    return static_cast<T>(1) << x;
  }

  template <typename T, typename std::enable_if<std::is_signed<T>::value, std::nullptr_t>::type = nullptr>
  constexpr T pow2(const T x) {
    return static_cast<T>(static_cast<typename std::make_unsigned<T>::type>(1) << static_cast<typename std::make_unsigned<T>::type>(x));
  }
}

#endif

// lib/monoid.hpp
#ifndef MONOID_HPP
#define MONOID_HPP


namespace tools {
  template <typename T>
  class monoid {
  private:
    ::std::function<T(T, T)> m_operation;
    T m_identity;

  public:
    monoid(const ::std::function<T(T, T)>& operation, const T& identity) :
      m_operation(operation),
      m_identity(identity) {
    }
    monoid(const ::tools::monoid<T>&) = default;
    monoid(::tools::monoid<T>&&) = default;
    ::tools::monoid<T>& operator=(const ::tools::monoid<T>&) = default;
    ::tools::monoid<T>& operator=(::tools::monoid<T>&&) = default;
    virtual ~monoid() = default;

    T operation(const T& x, const T& y) const {
      return this->m_operation(x, y);
    }
    const T& identity() const {
      return this->m_identity;
    }

    template <typename U = T, typename ::std::enable_if<::std::is_integral<U>::value, ::std::nullptr_t>::type = nullptr>
    static ::tools::monoid<U> multiplies() {
      return ::tools::monoid<U>(::std::multiplies<U>(), 1);
    }
  };
}

#endif

// lib/util.hpp
#ifndef UTIL_HPP
#define UTIL_HPP


typedef ::std::int_fast64_t i64;
typedef ::std::uint_fast64_t u64;
typedef ::std::int_fast32_t i32;
typedef ::std::uint_fast32_t u32;

namespace tools {
  template <typename T>
  void read(::std::istream& is, ::std::vector<T>& vector, const typename ::std::vector<T>::size_type size) {
    vector.reserve(size);
    ::std::copy_n(::std::istream_iterator<T>(is), size, ::std::back_inserter(vector));
  }
  template <typename T>
  void read(::std::vector<T>& vector, const typename ::std::vector<T>::size_type size) {
    ::tools::read(::std::cin, vector, size);
  }

  template <typename T, ::std::size_t N>
  void read(::std::istream& is, ::std::array<T, N>& array) {
    ::std::copy_n(std::istream_iterator<T>(is), N, array.begin());
  }
  template <typename T, ::std::size_t N>
  void read(::std::array<T, N>& array) {
    ::tools::read(::std::cin, array);
  }
}

#endif

// lib/ceil.hpp
#ifndef CEIL_HPP
#define CEIL_HPP


/*
usage:

tools::ceil(5, 3) // => 2 (i.e., ceil(5 / 3))
*/

#endif

// lib/ceil_log2.cpp

// Source: Stack Overflow ( https://stackoverflow.com/questions/3272424/compute-fast-log-base-2-ceiling/15327567#15327567 )
// Author: dgobbi ( https://stackoverflow.com/users/2154690/dgobbi )
// License: CC BY-SA 3.0
namespace tools {
  std::uint32_t ceil_log2(std::uint32_t x) {
    static const ::std::uint32_t t[6] = {
      0xFFFF0000u,
      0x0000FF00u,
      0x000000F0u,
      0x0000000Cu,
      0x00000002u
    };

    ::std::uint32_t y = (((x & (x - 1)) == 0) ? 0 : 1);
    ::std::uint32_t j = 16;

    for (const ::std::uint32_t& t_i : t) {
      ::std::uint32_t k = (((x & t_i) == 0) ? 0 : j);
      y += k;
      x >>= k;
      j >>= 1;
    }

    return y;
  }

  ::std::uint64_t ceil_log2(::std::uint64_t x) {
    static const ::std::uint64_t t[6] = {
      0xFFFFFFFF00000000u,
      0x00000000FFFF0000u,
      0x000000000000FF00u,
      0x00000000000000F0u,
      0x000000000000000Cu,
      0x0000000000000002u
    };

    ::std::uint64_t y = (((x & (x - 1)) == 0) ? 0 : 1);
    ::std::uint64_t j = 32;

    for (const ::std::uint64_t& t_i : t) {
      ::std::uint64_t k = (((x & t_i) == 0) ? 0 : j);
      y += k;
      x >>= k;
      j >>= 1;
    }

    return y;
  }

  ::std::int32_t ceil_log2(::std::int32_t x) {
    return static_cast<::std::int32_t>(::tools::ceil_log2(static_cast<::std::uint32_t>(x)));
  }

  ::std::int64_t ceil_log2(::std::int64_t x) {
    return static_cast<::std::int64_t>(::tools::ceil_log2(static_cast<::std::uint64_t>(x)));
  }
}

// lib/group.hpp
#ifndef GROUP_HPP
#define GROUP_HPP


namespace tools {
  template <typename T>
  class group : public ::tools::monoid<T> {
  private:
    ::std::function<T(T)> m_inverse;

  public:
    group(const ::std::function<T(T, T)>& operation, const T& identity, const ::std::function<T(T)>& inverse) :
      ::tools::monoid<T>(operation, identity), m_inverse(inverse) {
    }
    group(const ::tools::group<T>&) = default;
    group(::tools::group<T>&&) = default;
    ::tools::group<T>& operator=(const ::tools::group<T>&) = default;
    ::tools::group<T>& operator=(::tools::group<T>&&) = default;
    virtual ~group() = default;

    T inverse(const T& x) const {
      return this->m_inverse(x);
    }

    template <typename U = T, typename ::std::enable_if<::std::is_integral<U>::value, ::std::nullptr_t>::type = nullptr>
    static ::tools::group<U> plus() {
      return ::tools::group<U>(::std::plus<U>(), 0, ::std::negate<U>());
    }
  };
}

#endif

// lib/dual_segtree.hpp
#ifndef DUAL_SEGTREE_HPP
#define DUAL_SEGTREE_HPP


/*
usage:

// 6要素の区間加算双対セグ木
tools::dual_segtree<i64> dual_segtree(
  tools::group<i64>::plus(),
  6
);

// [0, 3)に一様に30を加算
dual_segtree.update(0, 3, 30);

// 0始まりで2番目の作用素を取得
std::cout << dual_segtree.query(2) << std::endl;
*/

namespace tools {
  template <typename E>
  class dual_segtree {
  private:
    ::tools::monoid<E> operator_monoid;
    ::std::size_t height;
    ::std::vector<E> lazy;

    void propagate(const ::std::size_t node_id) {
      if(this->lazy[node_id] == this->operator_monoid.identity()) return;
      this->lazy[(node_id << 1) | 0] = this->operator_monoid.operation(this->lazy[(node_id << 1) | 0], this->lazy[node_id]);
      this->lazy[(node_id << 1) | 1] = this->operator_monoid.operation(this->lazy[(node_id << 1) | 1], this->lazy[node_id]);
      this->lazy[node_id] = this->operator_monoid.identity();
    }

    void thrust(const ::std::size_t node_id) {
      for (::std::size_t h = this->height; h > 0; --h) {
        this->propagate(node_id >> h);
      }
    }

    ::std::size_t capacity() const {
      return this->lazy.size() / 2;
    }

  public:
    dual_segtree(
      const ::tools::monoid<E>& operator_monoid,
      const ::std::size_t& n
    ) :
      operator_monoid(operator_monoid),
      height(::tools::ceil_log2(n)),
      lazy(::tools::pow2(this->height + 1), operator_monoid.identity()) {
    }

    void update(const ::std::size_t a, const ::std::size_t b, const E& x) {
      if(a >= b) return;

      const ::std::size_t a_id = a + this->capacity();
      const ::std::size_t b_id = b + this->capacity() - 1;

      this->thrust(a_id);
      this->thrust(b_id);

      for (::std::size_t l = a_id, r = b_id + 1; l < r; l >>= 1, r >>= 1) {
        if (l & 1) {
          this->lazy[l] = this->operator_monoid.operation(this->lazy[l], x);
          ++l;
        }
        if (r & 1) {
          --r;
          this->lazy[r] = this->operator_monoid.operation(this->lazy[r], x);
        }
      }
    }

    E query(const ::std::size_t a) {
      const ::std::size_t node_id = a + this->capacity();
      this->thrust(node_id);
      return this->lazy[node_id];
    }
  };
}

#endif

// main.cpp

class monster {
public:
  i64 x;
  i64 hp;

  monster() = default;
  monster(const i64& x, const i64& hp) : x(x), hp(hp) {
  }

  friend std::istream& operator>>(std::istream& is, monster& self) {
    return is >> self.x >> self.hp;
  }
};

int main() {
  i64 N, D, A;
  std::cin >> N >> D >> A;
  std::vector<monster> monsters;
  tools::read(monsters, N);
  const tools::less_by<monster, i64> comp([](const monster& monster) { return monster.x; });
  std::sort(monsters.begin(), monsters.end(), comp);

  tools::dual_segtree<i64> damages(tools::group<i64>::plus(), N);

  i64 answer = 0;
  for (i64 i = 0; i < N; ++i) {
    const i64 bomb_count = tools::ceil(std::max<i64>(0, monsters[i].hp - damages.query(i)), A);
    damages.update(i, std::distance(monsters.begin(), std::upper_bound(monsters.begin(), monsters.end(), monster(monsters[i].x + 2 * D, 0), comp)), bomb_count * A);
    answer += bomb_count;
  }

  std::cout << answer << std::endl;
  return 0;
}

Measured memory_bytes: 7424