#include <bits/stdc++.h>
using namespace std;
int n, m;
void solve() {
  int v;
  cin >> n >> v;
  vector<pair<int, int> > a(n);
  for (int i = 0; i < n; i++) {
    int x;
    int y;
    cin >> x >> y;
    a[i] = make_pair(x, y);
  }
  sort(a.begin(), a.end());
  int ans = 0, inpocket = 0, withered = 0, previous2daysago = 0;
  int z = 0, removed = 0;
  for (int days = 1; days <= a[n - 1].first; days++) {
    removed = 0;
    for (; z < n; z++) {
      if (a[z].first == days) {
        removed += a[z].second;
      } else
        break;
    }
    if (inpocket > v) {
      ans += v;
      inpocket = removed;
    } else {
      int units = v - inpocket;
      ans += inpocket;
      if (units > removed) {
        ans += removed;
        removed = 0;
      } else {
        ans += units;
        removed = removed - units;
      }
      inpocket = removed;
    }
  }
  if (inpocket > v) {
    ans += v;
  } else {
    ans += inpocket;
  }
  cout << ans << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
