#include <bits/stdc++.h>
using namespace std;
const int N = 3005;
int n, v;
int a[N], b[N], tot[N];
void init() {
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  memset(tot, 0, sizeof(tot));
}
int main() {
  ios::sync_with_stdio(false);
  init();
  scanf("%d %d", &n, &v);
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &a[i], &b[i]);
    tot[a[i]] += b[i];
  }
  int pre = 0;
  int ans = 0;
  for (int i = 0; i < N; i++) {
    if (tot[i] + pre) {
      if (tot[i] + pre <= v) {
        ans += tot[i] + pre;
        pre = 0;
      } else {
        ans += v;
        if (pre >= v) {
          pre = tot[i];
        } else {
          pre = tot[i] + pre - v;
        }
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
