An ant is located in a forest on a flat surface at the coordinates x_1, y_1 and is moving toward the point x_2, y_2. In the forest, there is a tree whose trunk base is a circle with center at , and radius . The tree may block the ant's direct path. In this case, the ant must go around the tree trunk.
Write a program to determine the length of the shortest possible path the ant can travel.
The input contains real numbers x_1, y_1, x_2, y_2, , , , separated by spaces. The numbers are in the range from to , with r > 0. The ant's starting and ending points are not located inside the circle.
Output a single real number — the length of the shortest path. The absolute error of the result must not exceed (the answer should be printed with at least digits after the decimal point).
Example 1