Initially, the entire coordinate plane is colored white. N rectangles were painted black. The i-th rectangle has bottom-left corner
)
and top-right corner
)
for

. You want to paint some of the black area white so that the remaining black part has a horizontal axis of symmetry. Find the maximum possible area of the remaining black part.
输入描述:
The first line of input contains a single integer N (1 <= N <= 300000), denoting the number of rectangles.
The next N lines of input contain two space-separated integers each, denoting Li, Ri (1 <= Li < Ri <= 109).
输出描述:
Output a single integer, the answer to the problem.
示例1
说明
It is optimal to paint second rectangle entirely white and a rectangle with bottom-left corner (0, 4) and top-right corner (1, 5) white. Then, the remaining black figure has axis of symmetry at y = 2.5. The remaining black area is 4.