#include <bits/stdc++.h>
using namespace std;
int a[3200] = {0};
int main() {
  int n, v;
  int i, j;
  cin >> n >> v;
  int x, y;
  int maxx = 0;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    a[x] += y;
    if (x > maxx) {
      maxx = x;
    }
  }
  int ans = 0;
  int p;
  for (i = 1; i <= maxx + 1; i++) {
    p = v;
    if (a[i - 1] >= p) {
      a[i - 1] -= p;
      ans += p;
      p = 0;
    } else {
      ans += a[i - 1];
      p -= a[i - 1];
      a[i - 1] = 0;
    }
    if (p > 0) {
      if (a[i] >= p) {
        a[i] -= p;
        ans += p;
        p = 0;
      } else {
        ans += a[i];
        p -= a[i];
        a[i] = 0;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
