#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e3 + 10;
int n, v, a, b, f[maxn];
long long ans = 0;
void get_input() {
  cin >> n >> v;
  for (int i = 0; i < n; i += 1) {
    cin >> a >> b;
    f[a] += b;
  }
}
void solve() {
  for (int i = 0; i < maxn; i++) {
    ans += min(v, f[i]);
    f[i] -= min(v, f[i]);
    f[i + 1] += min(v, f[i]);
  }
}
void output() { cout << ans; }
int main() {
  ios_base ::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int tc = 1;
  while (tc--) {
    get_input(), solve(), output();
  }
  return 0;
}
