#include <bits/stdc++.h>
using namespace std;
long long f[3010];
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, v;
  cin >> n >> v;
  for (long long i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    f[a] += b;
  }
  long long ans = 0;
  for (long long i = 0; i < 3010; i++) {
    long long cur = v;
    if (i && f[i - 1]) {
      long long u = min(cur, f[i - 1]);
      cur -= u;
      ans += u;
    }
    if (cur) {
      long long u = min(cur, f[i]);
      ans += u;
      f[i] -= u;
    }
  }
  cout << ans;
}
