#include <bits/stdc++.h>
using namespace std;
long long n, h;
vector<pair<long long, long long>> x;
long long dp[200200];
int main() {
  cin >> n >> h;
  for (int i = 0; i < n; i++) {
    pair<long long, long long> t;
    cin >> t.first >> t.second;
    x.push_back(t);
  }
  dp[0] = 0;
  for (int i = 1; i < n; i++) dp[i] = dp[i - 1] + x[i].first - x[i - 1].second;
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    long long l = i, r = n - 1;
    while (l < r) {
      long long m = (l + r + 1) / 2;
      if (dp[m] - dp[i] < h)
        l = m;
      else
        r = m - 1;
    }
    ans = max(ans, x[l].second + (h - dp[l] + dp[i]) - x[i].first);
  }
  cout << ans;
  return 0;
}
