#include <bits/stdc++.h>
using namespace std;
long long n, h;
long long l[200010], r[200010];
long long dsum[200010], rsum[200010];
int main() {
  scanf("%lld%lld", &n, &h);
  for (long long i = (long long)(0); i < (long long)(n); i++)
    scanf("%lld%lld", l + i, r + i);
  for (long long i = (long long)(0); i < (long long)(n - 1); i++)
    dsum[i + 1] = dsum[i] + l[i + 1] - r[i];
  for (long long i = (long long)(0); i < (long long)(n); i++)
    rsum[i + 1] = rsum[i] + r[i] - l[i];
  long long res = h;
  for (long long i = (long long)(0); i < (long long)(n - 1); i++) {
    long long lb = 0, ub = n;
    while (ub - lb > 1) {
      long long mid = (lb + ub) / 2;
      if (dsum[mid] - dsum[i] < h)
        lb = mid;
      else
        ub = mid;
    }
    res = (res > h + rsum[ub] - rsum[i] ? res : h + rsum[ub] - rsum[i]);
  }
  res = (res > h + r[n - 1] - l[n - 1] ? res : h + r[n - 1] - l[n - 1]);
  cout << res << endl;
  return 0;
}
