PROGRAMMING:Tongsheng and rabbit come to a different world
Tong Sheng and Zhan Tu come to a different world. The world is full of ocean. There are n islands, and the coordinates of each island are (Xi, Yi). At this time, Zhan Tu is told by the ruler of the world that if you want to leave the world, you must go from the island with the smallest X coordinate to the island with the largest X coordinate, In this process, the x-coordinate value of the next Island you choose should be greater than the x-coordinate value of your current island. When you reach the island with the largest x-coordinate value, you return the island with the smallest x-coordinate value. In this process, the rule is opposite. The x-coordinate value of the next Island you choose is smaller than the x-coordinate value of your current island, You need to get to every island in the whole process, and you can only get to each island once except the starting point. Tong shengzhan rabbit wants to leave the world as soon as possible. Although he is a gifted physicist, he is not a gifted programmer. Can you tell him the shortest distance to leave the world??
###Input format:
First, the number of islands n is given, and then the coordinates of N islands are given in n rows. Note that the X axis of the given point is disordered, but it will not be repeated (2 < = n < = 1000) (0 < = Xi, Yi < = 100000)
###Output format:
Give the shortest distance and keep two decimal places
###Input example:
Here is a set of inputs. For example:
```in
three
1 1
2 3
3 1
```
###Output example:
The corresponding output is given here. For example:
```out
six point four seven
```
###Tips:
Tip: 1-3-2-1 is the way to generate the shortest path< br>
answer:If there is no answer, please comment
###Input format:
First, the number of islands n is given, and then the coordinates of N islands are given in n rows. Note that the X axis of the given point is disordered, but it will not be repeated (2 < = n < = 1000) (0 < = Xi, Yi < = 100000)
###Output format:
Give the shortest distance and keep two decimal places
###Input example:
Here is a set of inputs. For example:
```in
three
1 1
2 3
3 1
```
###Output example:
The corresponding output is given here. For example:
```out
six point four seven
```
###Tips:
Tip: 1-3-2-1 is the way to generate the shortest path< br>
answer:If there is no answer, please comment