import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;

void main() {
    auto s = readln.split;
    auto N = s[0].to!int;
    auto H = s[1].to!long;
    auto A = N.iota.map!(_ => readln.split.map!(to!long).array).array;
    long ans = 0;
    long tmp = 0;
    long h = 0;

    for (int i = 0, j = 0; i < N; ++i) {
        if (j <= i) {
            tmp = A[i][1] - A[i][0];
            h = H;
            j = i;
        } else {
            tmp -= A[i][0] - A[i - 1][0];
            h += A[i][0] - A[i - 1][1];
        }
        while (j + 1 < N && h - (A[j + 1][0] - A[j][1]) > 0) {
            tmp += A[j + 1][1] - A[j][1];
            h -= A[j + 1][0] - A[j][1];
            ++j;
        }
        ans = max(ans, tmp + h);
    }

    ans.writeln;
}
