#include <bits/stdc++.h>
using namespace std;
int n, v, a[3010], ans = 0, p, q;
int main() {
  cin >> n >> v;
  for (int i = 1; i <= n; i++) {
    cin >> p >> q;
    a[p] = a[p] + q;
  }
  for (int i = 1; i < 3005; i++) {
    ans = ans + min(a[i], v);
    a[i] = a[i] - min(a[i], v);
    a[i + 1] = a[i + 1] + min(a[i], v);
  }
  cout << ans;
  return 0;
}
