#include <bits/stdc++.h>
using namespace std;
const int maxn = 101111, maxm = 5011, inf = 2147000000;
struct orz {
  int d, num;
} a[maxn];
int n, v, ans;
bool cmp(orz x, orz y) { return (x.d < y.d); }
int main() {
  scanf("%d%d", &n, &v);
  int i, j, x, y;
  for (i = 1; i <= n; i++) scanf("%d%d", &a[i].d, &a[i].num);
  sort(a + 1, a + n + 1, cmp);
  x = 1;
  for (i = 2; i <= n; i++)
    if (a[i].d == a[x].d)
      a[x].num += a[i].num;
    else
      a[++x] = a[i];
  n = x;
  a[0].d = -10;
  int res;
  int now = 1;
  a[n + 1].d = -1;
  for (i = 1; i <= 3100; i++) {
    while (a[now].d < i - 1 && now < n) now++;
    res = v;
    if (a[now].d == i - 1 || a[now].d == i) {
      if (a[now].num <= res) {
        res -= a[now].num;
        a[now].num = 0;
      } else {
        a[now].num -= res;
        res = 0;
      }
    }
    if (a[now].d == i - 1 && res) {
      now++;
      if (a[now].d == i) {
        if (a[now].num <= res) {
          res -= a[now].num;
          a[now].num = 0;
        } else {
          a[now].num -= res;
          res = 0;
        }
      }
    }
    ans += v - res;
  }
  printf("%d\n", ans);
  return 0;
}
