#C2463. Truck Delivery Route Distance

    ID: 45782 Type: Default 1000ms 256MiB

Truck Delivery Route Distance

Truck Delivery Route Distance

You are given an integer n representing the number of delivery points and n pairs of integers representing the coordinates of these points in the order the truck visits them. Your task is to calculate the total Euclidean distance the truck travels along the route. The distance between two points \( (x_1, y_1) \) and \( (x_2, y_2) \) is given by the formula:

\( d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \)

Sum the distances between consecutive points, and output the total rounded to 6 decimal places.

Note: Use standard input (stdin) for input and standard output (stdout) for output.

inputFormat

The first line contains an integer n (1 ≤ n ≤ 105), the number of delivery points. Each of the next n lines contains two space-separated integers representing the x and y coordinates of a delivery point.

outputFormat

Output the total distance the truck travels, rounded to 6 decimal places.

## sample
1
0 0
0.000000

</p>