#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v;
  cin >> n >> v;
  std::vector<int> today(3003, 0);
  std::vector<int> yesterday(3003, 0);
  int a, b;
  for (int i = 0; i < n; ++i) {
    cin >> a >> b;
    today[a] += b;
  }
  int count = 0;
  int c = 0;
  for (int i = 1; i < 3002; ++i) {
    if (v <= yesterday[i]) {
      count += v;
      yesterday[i + 1] = today[i];
    }
    if (v > yesterday[i]) {
      count += yesterday[i];
      if (v - yesterday[i] <= today[i]) {
        count += v - yesterday[i];
        yesterday[i + 1] += today[i] - v + yesterday[i];
      } else {
        count += today[i];
      }
    }
  }
  cout << count;
}
