Problem D: Exportation in Space

In an era of space travelling, Mr. Jonathan A. Goldmine exports a special material named "Interstellar Condensed Powered Copper". A piece of it consists of several spheres floating in the air. There is strange force affecting between the spheres so that their relative positions of them are not changed. If you move one of them, all the others follow it.

<image>
Example of ICPC (left: bare, right: shielded)

To transport ICPCs between planets, it needs to be shielded from cosmic rays. It will be broken when they hit by strong cosmic rays. Mr. Goldmine needs to wrap up each ICPC pieces with anti-cosmic-ray shield, a paper-like material which cuts all the cosmic rays. To save cost, he wants to know the minimum area of the shield he needs to wrap an ICPC piece up.

Note that he can't put the shield between the spheres of an ICPC because it affects the force between the spheres. So that the only way to shield it is to wrap the whole ICPC piece by shield.

Mr. Goldmine asked you, an experienced programmer, to calculate the minimum area of shield for each material.

You can assume that each sphere in an ICPC piece is a point, and you can ignore the thickness of the shield.



Input

Each file consists of one test case, which has the information of one ICPC piece. A test case starts with a line with an integer N (4 <= N <= 50), denoting the number of spheres in the piece of the test case. Then N lines follow. The i-th line of them describes the position of the i-th sphere. It has 3 integers xi, yi and zi (0 <= x, y, z <= 100), separated by a space. They denote the x, y and z coordinates of the i-th sphere, respectively.

It is guaranteed that there are no data all of whose spheres are on the same plane, and that no two spheres in a data are on the same coordinate.

Output

For each input, print the area of the shield Mr. Goldmine needs. The output value should be in a decimal fraction and should not contain an error greater than 0.001.

Examples

Input

4
0 0 0
0 0 1
0 1 0
1 0 0


Output

2.366


Input

8
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1


Output

6.000
#include<iostream>
#include<vector>
#include<cmath>
#include<cstdio>
#include<cstdlib>

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

typedef long double D;

const D EPS = 1e-10;

int main() {
  int n;
  cin >> n;
  srand(time(NULL));
  vector<D> x(n), y(n), z(n);
  vector<D> xxx(n), yyy(n), zzz(n);
  rep (i, n) cin >> xxx[i] >> yyy[i] >> zzz[i];
  D res = 0;
  rep (i, n) {
    x[i] = xxx[i] + (D)rand() / RAND_MAX / 1000000;
    y[i] = yyy[i] + (D)rand() / RAND_MAX / 1000000;
    z[i] = zzz[i] + (D)rand() / RAND_MAX / 1000000;
  }
  vector<int> triA, triB, triC;
  rep (i, n) rep (j, i) rep (k, i) if (j != k) {
    D xx = (y[j] - y[i]) * (z[k] - z[i]) - (z[j] - z[i]) * (y[k] - y[i]);
    D yy = (z[j] - z[i]) * (x[k] - x[i]) - (x[j] - x[i]) * (z[k] - z[i]);
    D zz = (x[j] - x[i]) * (y[k] - y[i]) - (y[j] - y[i]) * (x[k] - x[i]);
    bool ok = true;
    rep (l, n) if (i != l && j != l && k != l) {
      if (xx * (x[l] - x[i]) + yy * (y[l] - y[i]) + zz * (z[l] - z[i]) > EPS) {
	ok = false;
	break;
      }
    }
    if (ok) {
      D xxxx = (yyy[j] - yyy[i]) * (zzz[k] - zzz[i]) - (zzz[j] - zzz[i]) * (yyy[k] - yyy[i]);
      D yyyy = (zzz[j] - zzz[i]) * (xxx[k] - xxx[i]) - (xxx[j] - xxx[i]) * (zzz[k] - zzz[i]);
      D zzzz = (xxx[j] - xxx[i]) * (yyy[k] - yyy[i]) - (yyy[j] - yyy[i]) * (xxx[k] - xxx[i]);
      res += sqrt(xxxx * xxxx + yyyy * yyyy + zzzz * zzzz) / 2;
    }
  }
  printf("%.12Lf\n", res);
  return 0;
}