URI Online Judge | 1620

# Delaunay Triangulation

By Roberto Costa, UNIFEI Brazil

Timelimit: 1

In mathematics, a Delaunay triangulation for a set of points P on the plane is a DT (P) where no point in P is inside the circumference formed by any triangle in DT (P). The Delaunay triangulation maximizes the smallest angle of all triangles in the triangulation; this tends to avoid triangles with very small internal angles.

The triangulation was invented by Boris Delaunay in 1934 for a set of points on a line there is no Delaunay triangulation (the concept of triangulation is broken for this case). For four or more points on the same circle (ie, the vertices of a rectangle) the Delaunay triangulation is not unique: each of the two possibilities of triangulation that divides the quadrilateral into two triangles satisfy the "Delaunay condition", ie that the circumferences of all triangles have hollow interiors. Whereas the circles are spheres, the notion of Delaunay triangulation extends to three dimensions. Generalizations are possible for different metrics of Euclidean. However, in these cases it can not guarantee the existence or uniqueness of the Delaunay triangulation.

The Mad Doctor da Silva, for his doctorate, he decided to check the statement on the Delaunay triangulation previously said was true. Analyzed settings perfect polygons, as shown.

It is true and found that the amount of arches that create the Delaunay triangulation for the same number of points was always the same. For example, to 3 is always three points, 4 points is always 5, 5 is always points 6 points 7 and 9 and is always so forth.

He then decided to create a real number (X) determined by the ratio of the amount of arch (I) with the number of points (L) which is:

Help the Doctor doing a program that calculates the value of the real number X.

## Input

The input consists of a test set containing a single row with an integer value L (3 ≤ L ≤ 1080). The input ends when L = 0.

## Output

For the input your program must produce one actual outcome X with accuracy of six decimal places. Use double variables.

 Sample Input Sample Output 3 4 5 6 0 0.000000 0.250000 0.400000 0.500000