#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v, p, q, a[4000] = {}, m = -1;
  cin >> n >> v;
  int i;
  for (i = 0; i < n; i++) {
    cin >> p >> q;
    a[p] = a[p] + q;
    m = max(m, p);
  }
  int sum = 0;
  int rem = 0;
  a[m + 1] = 0;
  for (i = 1; i <= m + 1; i++) {
    if (rem >= v) {
      sum = sum + v;
      rem = a[i];
    } else {
      sum = sum + rem;
      if (a[i] >= v - rem) {
        sum = sum + v - rem;
        rem = a[i] - v + rem;
      } else {
        sum = sum + a[i];
        rem = 0;
      }
    }
  }
  cout << sum;
}
