# util functions

# debug
$debugFlag = ( ARGV[0] != nil )
p "==== DEBUG MODE ====" if $debugFlag

def pd(str)
  p str if $debugFlag
end

def printd(str)
  print str if $debugFlag
end

# input
inputs = []
lc = 0
lst = []
while l = $stdin.gets do
  if lc == 0
    inputs << l.chomp.split(" ").map(&:to_i)
  else
    lst << l.chomp.split(" ").map(&:to_i)
  end
  lc += 1
end

# input check
if $debugFlag
  p "--- INPUT (begin) ---"
  inputs.each do |l_i|
    p l_i
  end
  p "--- INPUT (end) ---"
  print "\n"
end

# body
if $debugFlag
end

nn = inputs[0][0]

pd nn
pd lst

nums = []
for i in 0..nn-1
  nums << i
end

include Math

pats = nums.permutation(nums.size).to_a
nave = pats.size.to_f

cur = 0.0
pats.each do |pat|
  for i in 1..pat.length-1
    dx = (lst[pat[i]][0] - lst[pat[i-1]][0])
    dx = dx*dx
    dy = (lst[pat[i]][1] - lst[pat[i-1]][1])
    dy = dy*dy
    cur += sqrt(dx + dy)
  end
end

pd cur
pd nave

printf("%.10f\n", cur/nave)
