As you all know hosting a fest is very difficult task, because everything will not go according to your plans. There are many challeges, you have to take permissions from administration of the college, teachers and all. Then they will put some conditions which will ruin your plans.
As NIT Delhi is organizing Terratechnica`17 same thing happened here (not a surprize).
As in fest there will be noise, so to avoid this disturbance for faculties administration decided to restrict the area to be given for the fest. It was not expected at all. So after many requests they left the decision of selecting the area on the organisers .
Institute administration made a trick here, they gave long metal strip with some slight cuts on them(so that from these cuts one can bend the strip in any angle) and asked them to put this strip anywhere in the college the area inside that strip will be allocated for the fest. But there are many other works for the managers to do so they asked you to find the maximum area that can be allocated for the fest.
CONSTRAINTS
1<=n<=500
1<=si<=1000
number of testcase (t): 1<=t<=50
INPUT
Each test case consists of two lines.
The first line in each test case contains an integer n which indicates the number of the segments in the strip(number of cuts +1).
The next line contains n integers which indicate the lengths of the segments in the order they appear in the strip(S1,s2..,sn).
The last test case is followed by a line containing a single zero.
OUTPUT
For each case, display its case number followed by the maximum total enclosed area ( to the nearest whole number ) that can be obtained by folding the strip at the cuts made.