#include <bits/stdc++.h>
using namespace std;
int n, v;
int a, b;
int yo[3005], oy[3005];
int ans;
int main() {
  cin >> n >> v;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    yo[a] += b;
  }
  for (int i = 1; i <= 3001; i++) {
    int take = 0;
    if (oy[i] > v) {
      ans += v;
      oy[i + 1] = yo[i];
    } else {
      take = oy[i];
      ans += oy[i];
      int more = v - take;
      if (more >= yo[i]) {
        ans += yo[i];
      } else {
        ans += more;
        int add = yo[i] - more;
        oy[i + 1] = add;
      }
    }
  }
  cout << ans;
  return 0;
}
