#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v, i, j, ans, sum, mmax = 0, mmin;
  cin >> n >> v;
  vector<int> a(n), b(n);
  for (i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    mmax = max(a[i] + 1, mmax);
  }
  ans = 0;
  for (i = 1; i <= mmax; i++) {
    sum = 0;
    for (j = 0; j < n && sum < v; j++) {
      if (a[j] + 1 == i && b[j] > 0) {
        mmin = min(v - sum, b[j]);
        b[j] -= mmin;
        sum += mmin;
      }
    }
    if (sum < v) {
      for (j = 0; j < n && sum < v; j++) {
        if (a[j] == i && b[j] > 0) {
          mmin = min(b[j], v - sum);
          b[j] -= mmin;
          sum += mmin;
        }
      }
    }
    ans += sum;
  }
  cout << ans;
  return 0;
}
