#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v;
  cin >> n >> v;
  int d[3001] = {0}, car[3002] = {0};
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    d[a] += b;
  }
  long long tot = 0;
  for (int i = 1; i < 3001; i++) {
    int x = min(v, d[i] + car[i]);
    tot += x;
    if (x < v) continue;
    car[i + 1] = d[i] - max(0, v - car[i]);
  }
  tot += min(v, car[3001]);
  cout << tot;
  return 0;
}
