n = gets.chomp.to_i

points = []
n.times do
  points << gets.chomp.split(' ').map(&:to_i)
end
combs = points.permutation(n).to_a

ranges = []
combs.each do |comb|
  calc = []
  for i in 0...(comb.size-1) do
    calc << Math.sqrt((comb[i][0]-comb[i+1][0])**2 + (comb[i][1]-comb[i+1][1])**2)
  end
  ranges << calc.reduce(:+)
end

print ranges.reduce(:+)/ranges.size
