#include <bits/stdc++.h>
using namespace std;
int n, v;
int a[3300];
int main() {
  while (scanf("%d%d", &n, &v) != EOF) {
    memset(a, 0, sizeof(a));
    for (int i = 0; i < n; i++) {
      int ta, tb;
      scanf("%d%d", &ta, &tb);
      a[ta] += tb;
    }
    int ans = 0;
    for (int i = 1; i <= 3005; i++) {
      int today = 0;
      if (a[i - 1] > v) {
        today += v;
        a[i - 1] -= v;
      } else {
        today += a[i - 1];
        a[i - 1] = 0;
      }
      if (a[i] + today > v) {
        a[i] = a[i] - (v - today);
        today = v;
      } else {
        today += a[i];
        a[i] = 0;
      }
      ans += today;
    }
    printf("%d\n", ans);
  }
  return 0;
}
