A service records n uptime intervals on a timeline, each a half-open range from its start up to (but not including) its end. Intervals that overlap or touch (one ends exactly where the next begins) form a single continuous uptime stretch. After joining all such intervals, report the length of the longest continuous stretch.
Input format
Line 1: an integer n.
Next n lines: two integers start and end describing one interval.
Output format
A single integer: the length of the longest continuous merged stretch.
Constraints
- 1 ≤ n ≤ 100000
- 0 ≤ start ≤ end ≤ 1000000000