#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v;
  cin >> n >> v;
  map<int, int> a;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    a[x] += y;
  }
  int ans = 0;
  for (int i = 1; i < 3003; i++) {
    int add = min(a[i - 1], v);
    ans += add;
    int fadd = min(a[i], v - add);
    a[i] -= fadd;
    ans += fadd;
  }
  cout << ans << endl;
}
