#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v;
  cin >> n >> v;
  int fruitsEachDay[3002] = {0};
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    fruitsEachDay[a] += b;
  }
  int day = 1;
  int fruits = 0;
  bool firstDay = true;
  while (day <= 3001) {
    if (firstDay) {
      if (v >= fruitsEachDay[day]) {
        fruits += fruitsEachDay[day];
        fruitsEachDay[day] = 0;
      } else {
        fruits += v;
        fruitsEachDay[day] -= v;
      }
      firstDay = false;
    } else {
      int tempV = v;
      if (fruitsEachDay[day - 1] > 0) {
        if (tempV >= fruitsEachDay[day - 1]) {
          fruits += fruitsEachDay[day - 1];
          tempV -= fruitsEachDay[day - 1];
          fruitsEachDay[day - 1] = 0;
        } else {
          fruits += tempV;
          tempV = 0;
        }
      }
      if (tempV) {
        if (tempV >= fruitsEachDay[day]) {
          fruits += fruitsEachDay[day];
          fruitsEachDay[day] = 0;
        } else {
          fruits += tempV;
          fruitsEachDay[day] -= tempV;
        }
      }
    }
    day++;
  }
  cout << fruits;
}
