#include <bits/stdc++.h>
using namespace std;
int main() {
  int cancollect[5000];
  int frombefore[5000];
  for (int i = 0; i < 5000; i++) {
    cancollect[i] = 0;
    frombefore[i] = 0;
  }
  int n, v;
  cin >> n >> v;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    cancollect[a] += b;
  }
  long long ans = 0;
  for (int i = 0; i < 4000; i++) {
    int maxcancollect = cancollect[i] + frombefore[i];
    if (v < maxcancollect) {
      ans += v;
      maxcancollect -= v;
    } else {
      ans += maxcancollect;
      continue;
    }
    frombefore[i + 1] = min(maxcancollect, cancollect[i]);
  }
  cout << ans;
  return 0;
}
