#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v;
  scanf("%d %d", &n, &v);
  vector<int> cnt(3001);
  for (int i = 0; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    cnt[a - 1] += b;
  }
  int total = 0;
  for (int d = 0; d <= 3000; ++d) {
    int cap = v;
    for (int at = d - 1; at <= d; ++at)
      if (at >= 0) {
        int harvest = min(cap, cnt[at]);
        cnt[at] -= harvest;
        cap -= harvest;
        total += harvest;
      }
  }
  printf("%d\n", total);
}
