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