#include <bits/stdc++.h>
int a, b, c, d, e, g, h, i, j;
double po[505][3], w;
struct node {
  int u, v;
  int w;
  double va;
  int next;
};
struct node f[1000005];
int end[1005];
int an;
double an1;
int qq[1005];
double F[1005];
int que[10005];
int v[1005];
void set(int u, int v, int w, double va) {
  f[++e].u = u;
  f[e].v = v;
  f[e].w = w;
  f[e].va = va;
  f[e].next = end[u];
  end[u] = e;
}
int Min(int x, int y) {
  if (x < y) return x;
  return y;
}
int Find(int l, int r) {
  int ii, jj, kk;
  int ll, rr;
  memset(v, 0, sizeof(v));
  for (ii = l; ii <= r; ii++) F[ii] = (double)(1 << 30);
  F[l] = 0.0;
  que[1] = l;
  v[l] = 1;
  ll = 0;
  rr = 1;
  while (ll < rr) {
    ll++;
    jj = end[que[ll]];
    while (jj) {
      if (f[jj].w > 0 && F[que[ll]] + f[jj].va < F[f[jj].v]) {
        F[f[jj].v] = F[que[ll]] + f[jj].va;
        qq[f[jj].v] = jj;
        if (v[f[jj].v] == 0) {
          que[++rr] = f[jj].v;
          v[f[jj].v] = 1;
        }
      }
      jj = f[jj].next;
    }
    v[que[ll]] = 0;
  }
  if (F[r] >= (double)(1 << 30) - 1e-5) return 0;
  d = 1 << 30;
  for (ii = r; ii != l; ii = f[qq[ii]].u) d = Min(d, f[qq[ii]].w);
  w = F[r];
  if (F[r] != (double)(1 << 30)) return 1;
  return 0;
}
int Minus(int x, int y) {
  int ii;
  f[x].w -= y;
  if (x & 1)
    ii = x + 1;
  else
    ii = x - 1;
  f[ii].w += y;
}
void L(int l, int r) {
  int ii, jj, kk;
  while (Find(l, r)) {
    an += d;
    an1 += (double)d * w;
    for (ii = r; ii != l; ii = f[qq[ii]].u) Minus(qq[ii], d);
  }
}
double JL(int x, int y) {
  return sqrt((po[x][0] - po[y][0]) * (po[x][0] - po[y][0]) +
              (po[x][1] - po[y][1]) * (po[x][1] - po[y][1]));
}
int main() {
  scanf("%d", &a);
  for (i = 1; i <= a; i++) scanf("%lf%lf", &po[i][0], &po[i][1]);
  for (i = 1; i <= a; i++)
    for (j = 1; j <= a; j++)
      if (i != j && po[i][1] > po[j][1]) {
        w = JL(i, j);
        set(i + 1, a + j + 1, 1, w);
        set(a + j + 1, i + 1, 0, -w);
      }
  for (i = 1; i <= a; i++) {
    set(1, 1 + i, 2, 0.0);
    set(1 + i, 1, 0, 0.0);
  }
  for (i = 1; i <= a; i++) {
    set(1 + i + a, 1 + a + a + 1, 1, 0.0);
    set(1 + a + a + 1, 1 + i + a, 0, 0.0);
  }
  L(1, 1 + a + a + 1);
  if (an == a - 1)
    printf("%.20lf\n", an1);
  else
    printf("-1\n");
  return 0;
}
