#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
int main() {
  auto start = high_resolution_clock::now();
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, h;
  cin >> n >> h;
  vector<pair<int, int>> air(n);
  for (int i = 0; i < n; ++i) {
    cin >> air[i].first >> air[i].second;
  }
  vector<int> p(n);
  p[n] = 0;
  for (int i = 1; i < n; ++i) {
    p[i] = p[i - 1] + air[i].first - air[i - 1].second;
  }
  int ans = h;
  for (int l = 0, r = 0; l < n; ++l) {
    while (r < n && (p[r] - p[l]) < h) {
      ++r;
    }
    ans = max(ans, air[r - 1].second - air[l].first + (h - (p[r - 1] - p[l])));
  }
  cout << ans << endl;
  cerr << "Total execution time : "
       << duration_cast<milliseconds>(high_resolution_clock::now() - start)
              .count()
       << " ms" << endl;
  return 0;
}
