#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v, a, b, hate = 0, col = 0, r[3000 + 1];
  memset(r, 0, sizeof(r));
  cin >> n >> v;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    r[a] += b;
  }
  for (int i = 1; i <= 3000; i++) {
    if (r[i] + hate <= v) {
      col += (r[i] + hate);
      hate = 0;
    } else {
      if (hate >= v) {
        col += v;
        hate = r[i];
      } else {
        col += v;
        hate = (r[i] + hate - v);
      }
    }
  }
  col += min(hate, v);
  cout << col;
}
