#include <bits/stdc++.h>
using namespace std;
struct T {
  int x;
  int y;
} a[10000];
int cmp(T a, T b) { return a.x < b.x; }
int day[10000];
int main() {
  int n, v;
  scanf("%d%d", &n, &v);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &a[i].x, &a[i].y);
    day[a[i].x] += a[i].y;
  }
  int ans = 0;
  for (int i = 1; i <= 3009; i++) {
    if (v <= day[i - 1]) {
      ans += v;
    } else {
      ans += day[i - 1];
      int u = v - day[i - 1];
      if (day[i] >= u) {
        day[i] -= u;
        ans += u;
      } else {
        ans += day[i];
        day[i] = 0;
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
