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