Polygon
Upon selecting the key, the scientists stumbled upon a puzzle on the second page. It featured a regular N-gon and two points located outside of it. The challenge was: "What is the minimum length of string required to connect these two points without crossing the interior of the N-gon?". Professor Burunkin astutely observed that the boundaries might be crossed, as otherwise, the problem would be unsolvable. He calculated the necessary string length S, albeit with limited precision. He then set up a Cartesian coordinate system so that the center of the N-gon was at the origin (0, 0). He noted the coordinates of one vertex of the N-gon, along with the coordinates of the two points. Using this information, your task is to determine S.
Input
The first line contains the integer N (3 ≤ N ≤ 30). The second line provides the coordinates of one vertex of the N-gon. The third and fourth lines give the coordinates of the first and second points, respectively. All coordinates are real numbers, not exceeding 1000 in absolute value, and are given with up to two decimal places.
Output
Output the value of S with a precision of two decimal places.