#K66287. Optimized Delivery Route

    ID: 32387 Type: Default 1000ms 256MiB

Optimized Delivery Route

Optimized Delivery Route

You are given the coordinates of n delivery locations. Starting from the warehouse at (0, 0), you must determine the shortest route that visits every delivery location exactly once and returns to the warehouse. The distance between two points \( (x_1, y_1) \) and \( (x_2, y_2) \) is given by the Euclidean distance formula:

\[ \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2} \]

Your task is to compute the minimum total distance traveled using an optimal delivery order. Since floating point calculations are involved, round the final answer to the nearest integer.

inputFormat

The first line contains an integer n indicating the number of delivery locations.

The following n lines each contain two space-separated integers, representing the x and y coordinates of a delivery location.

Input is provided via standard input (stdin).

outputFormat

Output a single integer representing the rounded minimum total distance the truck must travel to start at the warehouse (0, 0), visit all delivery locations exactly once, and return to the warehouse.

Output should be printed to standard output (stdout).

## sample
1
3 4
10