#include <bits/stdc++.h>
using namespace std;
int xx[4] = {0, 0, 1, -1};
int yy[4] = {1, -1, 0, 0};
int n, v;
int a, b;
int f[int(1e5)];
int res = 0;
int main() {
  scanf("%d%d", &n, &v);
  for (int i = (1), _b = (n); i <= _b; i++) {
    scanf("%d%d", &a, &b);
    f[a] += b;
  }
  for (int i = (1), _b = (3001); i <= _b; i++) {
    int c = v;
    int d = min(f[i - 1], v);
    res += d;
    c -= d;
    int d2 = min(f[i], c);
    res += d2;
    f[i] -= d2;
  }
  cout << res << endl;
}
