#include <bits/stdc++.h>
using namespace std;
using namespace std;
int main() {
  long long n, v, a, b, i, sum;
  while (cin >> n >> v) {
    vector<long long> x(3005);
    for (i = 0; i < n; i++) {
      cin >> a >> b;
      x[a] += b;
    }
    sum = 0;
    for (i = 1; i < 3005; i++) {
      if (x[i - 1] < v) {
        if (x[i] + x[i - 1] < v) {
          sum += x[i] + x[i - 1];
          x[i] = 0;
        } else {
          sum += v;
          x[i] = (x[i - 1] + x[i]) - v;
        }
      } else {
        sum += v;
      }
    }
    cout << sum << "\n";
  }
  return 0;
}
