B. foodbreak
time limit per test
1 second
memory limit per test
128 megabytes
input
standard input
output
standard output

Alex is organizing the next coding bootcamp at your university. Between managing speakers, coordinating with professors and answering questions in Discord, he's forgotten to plan the most crucial part: lunch breaks.

The bootcamp day starts at time $$$0$$$ and lasts $$$T$$$ units of time. Alex has scheduled $$$N$$$ presentations, where presentation $$$i$$$ occupies the time interval $$$[s_i, e_i)$$$. To arrange the food break, Alex needs to find the largest gap between presentations.

A gap is a maximal time interval $$$[a, b)$$$ during the day where no presentations are scheduled (that is, $$$0 \leq a \lt b \leq T$$$ and no presentation overlaps with $$$[a, b)$$$). Your task is to find the length of the largest gap.

Input

The first line contains two integers $$$N$$$ ($$$1 \leq N \leq 10^5$$$) and $$$T$$$ ($$$1 \leq T \leq 10^9$$$) — the number of presentations and the length of the day.

Each of the next $$$N$$$ lines contains two integers $$$s_i$$$ and $$$e_i$$$ ($$$0 \leq s_i \lt e_i \leq T$$$) — the start and end times of presentation $$$i$$$. Presentation $$$i$$$ occupies the half-open interval $$$[s_i, e_i)$$$, meaning it includes time $$$s_i$$$ but not time $$$e_i$$$.

Output

Output one integer — the length of the largest gap between presentations.

Example
Input
4 60
5 10
50 55
25 30
15 20
Output
20