#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v, q, w, max = 1, min = 0;
  cin >> n >> v;
  map<int, long int> a;
  for (int i = 0; i < n; i++) {
    cin >> q >> w;
    a[q] = a[q] + w;
    if (q > max) max = q;
    if (min == 0)
      min = q;
    else if (min > q)
      min = q;
  }
  long int pr = 0, is = 0;
  for (int i = min; i <= max + 1; i++) {
    if (pr >= v) {
      is = is + v;
      pr = a[i];
    } else {
      if ((pr + a[i]) >= v) {
        pr = a[i] + pr - v;
        is = is + v;
      } else {
        is = is + pr + a[i];
        pr = 0;
      }
    }
  }
  cout << is;
  return 0;
}
