#include <bits/stdc++.h>
inline long long read() {
  long long x = 0;
  char ch = getchar(), w = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * w;
}
void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
inline void writeln(long long x) {
  write(x);
  puts("");
}
using namespace std;
const int N = 410;
int n;
struct T {
  int x, y;
} a[N];
const int M = N * N * 6;
struct Edge {
  int u, v, nxt, f;
  double w;
} e[M * 2];
int head[N * 2], en = 1;
void addl(int x, int y, double z, int f) {
  e[++en].u = x, e[en].v = y, e[en].nxt = head[x], head[x] = en, e[en].f = f,
  e[en].w = z;
  e[++en].u = y, e[en].v = x, e[en].nxt = head[y], head[y] = en, e[en].f = 0,
  e[en].w = -z;
}
int s, t;
double d[N * 2];
queue<int> q;
bool inq[N * 2];
int inc[N << 1];
int pre[N << 1];
const int inf = 1e9;
bool spfa() {
  for (int i = 1; i <= t; ++i) d[i] = 1e111, inq[i] = 0;
  d[s] = 0;
  inc[s] = inf;
  q.push(s);
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    inq[x] = 0;
    for (int i = head[x]; i; i = e[i].nxt)
      if (e[i].f && d[e[i].v] > d[x] + e[i].w) {
        inc[e[i].v] = min(inc[x], e[i].f);
        d[e[i].v] = d[x] + e[i].w;
        pre[e[i].v] = i;
        if (!inq[e[i].v]) {
          inq[e[i].v] = 1;
          q.push(e[i].v);
        }
      }
  }
  return d[t] < 1e111;
}
int ans1;
double ans2;
void KM() {
  ans1 += inc[t];
  ans2 += inc[t] * d[t];
  int x = t;
  while (x != s) {
    e[pre[x]].f -= inc[t];
    e[pre[x] ^ 1].f += inc[t];
    x = e[pre[x]].u;
  }
}
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) a[i].x = read(), a[i].y = read();
  int p = 1;
  for (int i = 2; i <= n; ++i)
    if (a[i].y > a[p].y) p = i;
  s = n * 2 + 1;
  t = n * 2 + 2;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j)
      if (a[i].y > a[j].y) {
        addl(i, j + n,
             sqrt(((a[i].y - a[j].y) * (a[i].y - a[j].y)) +
                  ((a[i].x - a[j].x) * (a[i].x - a[j].x))),
             1);
      }
  for (int i = 1; i <= n; ++i) {
    addl(i + n, t, 0, 1);
    addl(s, i, 0, 2);
  }
  while (spfa()) {
    KM();
  }
  if (ans1 != n - 1) {
    puts("-1");
    return 0;
  }
  printf("%.8lf\n", ans2);
  return 0;
}
