#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v, lb, la;
  cin >> n >> v;
  int a[3005];
  for (int i = 0; i < 3005; ++i) {
    a[i] = 0;
  }
  int rem;
  for (int i = 0; i < n; ++i) {
    cin >> la >> lb;
    a[la] += lb;
  }
  int ans = 0;
  for (int i = 1; i < 3004; ++i) {
    if (a[i] + a[i - 1] > v) {
      ans += v;
      rem = v - a[i - 1];
      if (rem >= 0) {
        a[i] -= rem;
      }
    } else {
      a[i] += a[i - 1];
      ans += a[i];
      a[i] = 0;
    }
  }
  cout << ans << endl;
  return 0;
}
