#include <bits/stdc++.h>
using namespace std;
struct t {
  int a, b;
};
bool cmp(t n1, t n2) { return n1.a < n2.a; }
int main() {
  int n, v;
  cin >> n >> v;
  t* list1 = new t[n];
  int fruits[3002];
  int m = -1;
  for (int i = 0; i <= 3001; i++) fruits[i] = 0;
  for (int i = 0; i < n; i++) {
    cin >> list1[i].a >> list1[i].b;
    fruits[list1[i].a] += list1[i].b;
    m = max(m, list1[i].a);
  }
  int ans = 0;
  int k;
  m++;
  for (int i = 1; i <= m; i++) {
    k = 0;
    if (fruits[i - 1] > 0) {
      k = min(fruits[i - 1], v);
      ans += k;
    }
    if (v - k > 0) {
      k = min(fruits[i], v - k);
      ans += k;
      fruits[i] -= k;
    }
  }
  cout << ans;
  return 0;
}
