Enclosing the Grid Points

No attempts yetTime limit5sMemory limit256 MB

Problem

Peter and Bob play a game on a sheet of graph paper. Peter marks a few grid nodes with points, and Bob draws a polygon around them. Every marked node has to lie strictly inside the polygon, never on its border. Every side of the polygon lies along a side or a diagonal of a grid cell, and the perimeter is as short as possible. Compute that perimeter.

Input

The first line contains the number of points Peter marked, NN (1N1000001 \le N \le 100\,000). Each of the next NN lines contains two integers xix_i and yiy_i, the coordinates of one point. Each coordinate has absolute value at most 10610^6. Several points can share the same coordinates.

Output

Print the perimeter of the polygon on one line, rounded to exactly six digits after the decimal point.