Shortest Computer Reboot Tour

No attempts yetTime limit0.1sMemory limit128 MB

Problem

A large company decided to install a new operating system on all of their computers. The moment the installation finished on the last computer, every other computer froze and could no longer be controlled remotely. The administrator now has to walk to each computer in person, restart it, and finally return to the computer where the round started.

Help the administrator by finding the length of the shortest closed tour that starts at one computer, visits every computer exactly once, and returns to the starting computer.

Each computer has a position given by two coordinates xx and yy in the plane. The distance between two computers at (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is the Euclidean distance

(x1x2)2+(y1y2)2.\sqrt{(x_1-x_2)^2 + (y_1-y_2)^2}.

Input

The first line contains one integer NN (1N121 \le N \le 12), the number of computers. Each of the next NN lines contains two integers xix_i and yiy_i (0xi,yi10000000 \le x_i, y_i \le 1\,000\,000), the coordinates of the ii-th computer. All computers are at distinct locations.

Output

Print a single line with the minimum possible total length of such a closed tour, rounded to exactly two decimal places.