#include <bits/stdc++.h>
using namespace std;
const int N = 3e3;
int main() {
  int n, v;
  pair<int, int> a[N];
  cin >> n >> v;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  int now = 0;
  int ans = 0;
  for (int i = 1; i <= N + 1; i++) {
    int w = v;
    for (int j = 0; j < n; j++) {
      if (a[j].first == i - 1 && w != 0) {
        ans += min(w, a[j].second);
        w = w - min(w, a[j].second);
      }
    }
    for (int j = 0; j < n; j++) {
      if (a[j].first == i && w != 0) {
        ans += min(w, a[j].second);
        int y = a[j].second;
        a[j].second -= min(w, y);
        w = w - min(w, y);
      }
    }
  }
  cout << ans;
  return 0;
}
