#include <bits/stdc++.h>
using namespace std;
int const N = 3010;
int n, v, A[N], a, b;
int main() {
  cin >> n >> v;
  memset(A, 0, sizeof(A));
  int mi = N, ma = 0;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    A[a] += b;
    mi = min(mi, a);
    ma = max(ma, a);
  }
  int s = 0, ans = 0;
  for (int i = mi; i <= ma; i++) {
    if (v > s + A[i]) {
      ans += s + A[i];
      s = 0;
    } else {
      ans += v;
      s = min(A[i], s + A[i] - v);
    }
  }
  ans += min(v, s);
  cout << ans << endl;
  return 0;
}
