#include <bits/stdc++.h>
using namespace std;
using LL = long long;
LL x[200004];
LL y[200004];
int main() {
  LL n, h;
  scanf("%lld %lld", &n, &h);
  for (LL i = 1; i <= n; i++) {
    scanf("%lld %lld", &x[i], &y[i]);
    x[i]++;
  }
  LL best = h;
  LL curcol = n + 1;
  x[n + 1] = 1e10 + 10;
  LL cur = x[n + 1] + h;
  y[n + 1] = x[n + 1];
  for (LL i = n; i >= 1; i--) {
    LL sub = x[i + 1] - y[i] - 1;
    while (true) {
      if (cur - sub > y[curcol]) {
        if (sub == 0) break;
        cur -= sub;
        sub = 0;
      } else {
        sub -= (cur - y[curcol]);
        cur = x[curcol] - 1;
        curcol--;
      }
    }
    best = max(best, cur - x[i] + 1);
  }
  cout << best << endl;
  return 0;
}
