#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 22;
const int BITMAX = 18;
const long long INF = 1e9 + 88;
const int MOD = 1e9 + 7;
const long double Pi = acos(-1);
pair<int, int> a[MAX];
int diff[MAX];
int val[MAX];
int main() {
  int n, h;
  scanf("%d", &n);
  scanf("%d", &h);
  for (int i = 0; i < n; ++i) {
    int x, y;
    scanf("%d", &x);
    scanf("%d", &y);
    a[i] = {x, y};
    val[i] = y - x;
    if (i) diff[i] = x - a[i - 1].second;
  }
  if (n == 1) return printf("%d\n", val[0] + h), 0;
  int rem = h;
  int cur = val[0];
  int res = h;
  int i = 0, j = 0;
  while (i < n && j + 1 < n) {
    if (i + 1 >= n || rem - diff[i + 1] <= 0) {
      cur -= val[j];
      rem += diff[++j];
    } else {
      rem -= diff[++i];
      cur += val[i];
    }
    res = max(res, cur + h);
  }
  printf("%d\n", res);
  return 0;
}
