Ancient peoples regarded magic as a technique for compelling the help of divine powers. In a well-known story, one group of sorcerers threw their walking sticks on the floor, where they turned into live serpents; in opposition, another person threw down a stick that became a serpent which then devoured the sorcerers' serpents.
The only magic this problem needs is its solution. You are given a magic stick made of several straight segments connected end to end by joints, forming a single chain. The stick can be folded only at its joints. By folding, you can bring the two ends of a run of consecutive segments together so that the run closes into a polygon.
With one stick you may form several polygons at once. Each segment may belong to at most one polygon, segments may touch only at their endpoints, and — because the stick is a single chain that folds only at its joints — every polygon must be built from consecutive segments. Segments that are part of no polygon are simply left unfolded.
For a fixed set of side lengths, the largest possible area of a polygon is the one inscribed in a circle. Determine the maximum total area that can be enclosed by the polygons formed from the stick.
The input contains several test cases. Each test case describes one magic stick. The first line of a test case contains an integer $n$ ($1 \le n \le 500$), the number of segments. The next line contains $n$ integers $S_1, S_2, \ldots, S_n$ ($1 \le S_i \le 1000$), the lengths of the segments in the order they appear along the stick.
The last test case is followed by a line containing a single $0$, which is not processed.
For each test case, print one line of the form Case k: A, where $k$ is the test case number (starting from 1) and $A$ is the maximum total area that can be enclosed, printed with exactly six digits after the decimal point. If no polygon can be formed, the area is 0.000000.