#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v;
  cin >> n >> v;
  int A[n];
  int B[n];
  for (int i = 0; i < n; i++) {
    cin >> A[i] >> B[i];
  }
  int ans = 0;
  int t, _v, s = 0;
  for (t = 1; t < 3002; t++) {
    _v = v;
    for (int i = 0; i < n; i++) {
      if (A[i] + 1 == t) {
        if (B[i] < _v) {
          _v -= B[i];
          ans += B[i];
          B[i] = 0;
        } else {
          B[i] -= _v;
          ans += _v;
          _v = 0;
        }
      }
    }
    for (int i = 0; i < n; i++) {
      if (A[i] == t) {
        if (B[i] < _v) {
          _v -= B[i];
          ans += B[i];
          B[i] = 0;
        } else {
          B[i] -= _v;
          ans += _v;
          _v = 0;
        }
      }
    }
  }
  cout << ans;
  return 0;
}
