Convex hull#857

Convex hull

1 second
128 megabytes
Very easy

points are given on the plane with their Cartesian coordinates. Find the polygon with minimum perimeter that contains all these points. It is known that the desired polygon has non-zero area.

Input

The first line contains the number of points (3 \le n \le 1000) on the plane. The next lines give the coordinates x_i, y_i (-10000 \le x_i, y_i \le 10000) of these points. All input numbers are integers, all points are distinct.

Output

Print the perimeter of the polygon with one digit after the decimal point.

Examples

Example 1

Loading
Loading