#include <bits/stdc++.h>
int tree[3010], f[3010][2];
int main() {
  int n, v, i, j, k, res, a, b, temp;
  while (scanf("%d%d", &n, &v) != EOF) {
    res = 0;
    memset(tree, 0, sizeof(tree));
    for (i = 0; i < n; i++) {
      scanf("%d%d", &a, &b);
      if (tree[a] == 0) {
        tree[a] = b;
      } else
        tree[a] += b;
    }
    for (i = 0; i < 3005; i++) {
      if (i == 0) {
        if (tree[i] > v) {
          tree[i] = tree[i] - v;
          res += v;
        } else {
          res += tree[i];
          tree[i] = 0;
        }
      } else {
        temp = v;
        if (tree[i - 1] > temp) {
          res += temp;
          temp = 0;
        } else {
          res += tree[i - 1];
          temp = temp - tree[i - 1];
          if (tree[i] > temp) {
            res += temp;
            tree[i] = tree[i] - temp;
          } else {
            res += tree[i];
            tree[i] = 0;
          }
        }
      }
    }
    printf("%d\n", res);
  }
  return 0;
}
