#include <bits/stdc++.h>
using namespace std;
int N, H;
pair<int, int> A[200005];
int psm[200005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N >> H;
  for (int i = 1; i <= N; i++) cin >> A[i].first >> A[i].second;
  for (int i = 1; i <= N; i++) {
    psm[i] = psm[i - 1] + A[i].second - A[i].first;
  }
  int mx = H;
  for (int i = N; i >= 1; i--) {
    int l = i, r = N + 1;
    while (l + 1 < r) {
      int m = (l + r) / 2;
      int pos = H - (A[m].first - A[i].first) + psm[m - 1] - psm[i - 1];
      if (pos > 0)
        l = m;
      else
        r = m;
    }
    mx = max(mx, H + psm[l] - psm[i - 1]);
  }
  cout << mx << '\n';
  return 0;
}
