#include <bits/stdc++.h>
using namespace std;
int s[3333];
int n, x;
void solve() {
  int kq;
  int t, tam;
  int i;
  int a, b;
  memset(s, 0, sizeof(s));
  for (i = 0; i < n; i++) {
    scanf("%d %d", &a, &b);
    s[a] += b;
  }
  kq = 0;
  for (i = 1; i <= 3001; i++) {
    t = x;
    tam = min(t, s[i - 1]);
    kq = kq + tam;
    t = t - tam;
    tam = min(t, s[i]);
    kq = kq + tam;
    s[i] = s[i] - tam;
  }
  printf("%d\n", kq);
}
int main() {
  while (scanf("%d %d", &n, &x) > 0) {
    solve();
  }
  return 0;
}
