#include <bits/stdc++.h>
using namespace std;
template <typename T>
void print(T x) {
  cout << x << "\n";
}
template <typename T1, typename T2>
void print2(T1 x, T2 y) {
  cout << x << " " << y << "\n";
}
template <typename T1, typename T2, typename T3>
void print3(T1 x, T2 y, T3 z) {
  cout << x << " " << y << " " << z << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long test_case;
  test_case = 1;
  while (test_case--) {
    long long n, v;
    cin >> n >> v;
    vector<long long> arr(3002);
    fill(arr.begin(), arr.end(), 0);
    long long a, b, max_day = INT_MIN;
    for (long long i = 0; i < n; i++) {
      cin >> a >> b;
      arr[a] += b;
      max_day = max(max_day, a);
    }
    long long curr = 0, tv, ans = 0;
    for (long long i = 1; i <= max_day + 1; i++) {
      if (arr[i] + curr <= v)
        ans += (curr + arr[i]), curr = 0;
      else
        ans += v, tv = max(v - curr, 0ll), curr = arr[i] - tv;
    }
    print(ans);
  }
}
