#include<bits/stdc++.h>
using namespace std;
typedef pair<double,double> PDD;
const int N=20,M=(1<<15)+5;
int n;
double dist[N][N],f[N][M],ans;
PDD pos[N];
double getdis(PDD i,PDD j)
{
double t=(i.first-j.first)*(i.first-j.first)+(i.second-j.second)*(i.second-j.second);
return sqrt(t);
}
int main()
{
memset(f,127,sizeof(f));
pos[0]={0,0};
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
double x,y;
scanf("%lf%lf",&x,&y);
pos[i]={x,y};
}
for(int i=0;i<=n;i++)
for(int j=i+1;j<=n;j++)
{
dist[i][j]=getdis(pos[i],pos[j]);
dist[j][i]=dist[i][j];
}
for(int i=1;i<=n;i++) f[i][1<<(i-1)]=dist[0][i];
for(int k=1;k<(1<<n);k++)
{
for(int i=1;i<=n;i++)
{
if(k&(1<<(i-1))==0) continue;
for(int j=1;j<=n;j++)
{
if(i==j) continue;
if(k&(1<<(j-1))==0) continue;
f[i][k]=min(f[i][k],f[j][k-(1<<(i-1))]+dist[i][j]);
}
}
}
for(int i=1;i<=n;i++)
if(i==1||ans>f[i][(1<<n)-1]) ans=f[i][(1<<n)-1];
printf("%.2lf\n",ans);
return 0;
}