#include <bits/stdc++.h>
using namespace std;
int ans;
int d[3030], b[3030];
int a;
int main() {
  int n, v;
  cin >> n >> v;
  int cur, now, ans;
  ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> a >> b[i];
    d[a] += b[i];
  }
  cur = 0;
  int can;
  for (int i = 0; i < 3002; ++i) {
    now = d[i];
    can = now + cur;
    if (can <= v) {
      ans += can;
      cur = 0;
    } else {
      ans += v;
      cur = now - max(0, v - cur);
    }
  }
  cout << ans;
  return 0;
}
