//状态压缩:
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<vector>
#include<cmath>
using namespace std;
const int maxn = (1<<13) - 1;
int n;
double dp[maxn];
int res[13];
vector<int>v;
double area(int a, int b, int c)
{
if(a+b <= c) return 0.0;
else
{
double p = (a + b + c) * 0.5;
return sqrt(p * (p-a) * 1.0 * (p-b) * 1.0 * (p-c) * 1.0);
}
}
int main()
{
while(cin >> n && n)
{
memset(dp,0,sizeof(dp));
v.clear();
for(int i = 0; i < n; ++i) cin >> res[i];
sort(res,res+n);
for(int i = 0; i < n; ++i)
{
for(int j = i + 1; j < n;++j)
{
for(int k = j + 1; k < n;++k)
{
int st = (1<<i) | (1<<j) | (1<<k);
dp[st] = area(res[i], res[j], res[k]);
if(res[i] + res[j] > res[k]) v.push_back(st);
}
}
}
int max_case = 0;
for(int i = 0; i < (1<<n); ++i)
{
for(int j = 0; j < (int)v.size(); ++j)
{
if((i&v[j])) continue;
dp[(i|v[j])] = max(dp[(i|v[j])], dp[i] + dp[v[j]]);
}
}
printf("%.2lf\n", dp[(1<<n) - 1]);
}
return 0;
}