#include <bits/stdc++.h>
using namespace std;
int n;
double x, y;
double ans = 10000000;
vector<pair<double, double>> v;
double vis[20];
double f[20][33000];
double getDis(int v1, int v2) {
return sqrt((v[v1].first - v[v2].first) * (v[v1].first - v[v2].first) +
(v[v1].second - v[v2].second) * (v[v1].second - v[v2].second));
}
void dfs(int u, int lastid, int status, double dis) {
if (dis >= ans)
return;
if (u == n) {
ans = min(ans, dis);
return;
}
for (int i = 1; i <= n; i++) {
int newStatus = status + (1 << i);
if (!vis[i]) {
if (f[i][newStatus] != 0 && f[i][newStatus] <= f[lastid][status] + getDis(lastid, i))
return;
f[i][newStatus] = f[lastid][status] + getDis(lastid, i);
vis[i] = 1;
dfs(u + 1, i, newStatus, dis + getDis(lastid, i));
vis[i] = 0;
}
}
}
int main() {
cin >> n;
v.push_back({0, 0});
for (int i = 0; i < n; i++) {
cin >> x >> y;
v.push_back({x, y});
}
dfs(0, 0, 0, 0);
printf("%.2lf", ans);
return 0;
}