#include <bits/stdc++.h>
using namespace std;
int n, v;
int vis[3010];
int main() {
  int ans = 0;
  scanf("%d%d", &n, &v);
  memset(vis, 0, sizeof(vis));
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    vis[x] += y;
  }
  for (int i = 1; i <= 3001; i++) {
    int cnt = min(vis[i - 1], v);
    if (cnt < v && vis[i]) {
      if (vis[i] >= v - cnt)
        vis[i] -= v - cnt, cnt = v;
      else
        cnt += vis[i], vis[i] = 0;
    }
    ans += cnt;
  }
  printf("%d\n", ans);
  return 0;
}
