#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 9;
const long long mod = 1e9 + 7;
pair<long long, long long> x[maxn];
long long pre[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  long long h, sum = 0;
  cin >> n >> h;
  for (int i = 0; i < n; i++) cin >> x[i].first >> x[i].second;
  for (int i = 1; i < n; i++) {
    sum += x[i].first - x[i - 1].second;
    pre[i] = sum;
  }
  long long res = 0, cur;
  for (int i = 0; i < n; i++) {
    if (h > sum - pre[i]) {
      cur = x[n - 1].second + h - (sum - pre[i]);
      res = max(res, cur - x[i].first);
      continue;
    }
    int l, r, mid;
    l = i, r = n - 1;
    while (r - l > 1) {
      mid = (l + r) >> 1;
      if (h - (pre[mid] - pre[i]) <= 0)
        r = mid;
      else
        l = mid;
    }
    cur = x[r].first + (h - (pre[r] - pre[i]));
    res = max(res, cur - x[i].first);
  }
  cout << res << "\n";
}
