#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int x1[200005], x2[200005];
long long sum[200005];
int main() {
  int n, h;
  scanf("%d%d", &n, &h);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x1[i], &x2[i]);
  }
  for (int i = 2; i <= n; i++) {
    int val = x1[i] - x2[i - 1];
    sum[i] = sum[i - 1] + val;
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    int lo = i, hi = n, res = i;
    while (lo <= hi) {
      int mid = (lo + hi) / 2;
      long long v = sum[mid] - sum[i];
      if (v < h)
        res = mid, lo = mid + 1;
      else
        hi = mid - 1;
    }
    long long rem = h - (sum[res] - sum[i]);
    long long res2 = x2[res] + rem;
    ans = max(ans, res2 - x1[i]);
  }
  printf("%lld\n", ans);
}
