#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<iostream>
#include<iomanip>
#include<list>
#include<map>
#include<queue>
#include<sstream>
#include<stack>
#include<string>
#include<set>
#include<vector>
using namespace std;
#define PI acos(-1.0)
#define EXP exp(1)
#define pppp cout<<endl;
#define EPS 1e-8
#define LL long long
#define ULL unsigned long long //1844674407370955161
#define INT_INF 0x3f3f3f3f //1061109567
#define LL_INF 0x3f3f3f3f3f3f3f3f //4557430888798830399
// ios::sync_with_stdio(false);
// 那么cin, 就不能跟C的 scanf,sscanf, getchar, fgets之类的一起使用了。
const int dr[]= {0, 0, -1, 1, -1, -1, 1, 1};
const int dc[]= {-1, 1, 0, 0, -1, 1, -1, 1};
inline int read()//输入外挂
{
int ret=0, flag=0;
char ch;
if((ch=getchar())=='-')
flag=1;
else if(ch>='0'&&ch<='9')
ret = ch - '0';
while((ch=getchar())>='0'&&ch<='9')
ret=ret*10+(ch-'0');
return flag ? -ret : ret;
}
const int maxn=1050;
struct Point
{
double x,y,z;
} A[maxn];
int n;
double dis(Point a,Point b)
{
return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)+(a.z-b.z)*(a.z-b.z));
}
int main()
{
int n;
scanf("%d",&n);
for(int i=0; i<n; i++)
scanf("%lf%lf%lf",&A[i].x,&A[i].y,&A[i].z);
double step=10000;
double ans=LL_INF;
double mt;
Point O;
O.x=O.y=O.z=0;
int cnt=0;
while(step>EPS)
{
for(int i=0; i<n; i++)
if(dis(O,A[cnt])<dis(O,A[i]))
cnt=i;
mt=dis(O,A[cnt]);
ans=min(ans,mt);
O.x+=(A[cnt].x-O.x)/mt*step;
O.y+=(A[cnt].y-O.y)/mt*step;
O.z+=(A[cnt].z-O.z)/mt*step;
step*=0.98;
}
//printf("%lf %lf %lf\n",O.x,O.y,O.z);//圆心
printf("%.10f\n",ans);//半径
return 0;
}