N = gets.to_i
z = [nil]

N.times do
  z << gets.split.map(&:to_i)
end

def dist(z1, z2)
  Math.sqrt((z1[0] - z2[0])**2 + (z1[1] - z2[1])**2)
end

sum = 0.0

[*1..N].permutation(N) do |i|
  i.inject { |j, k| sum += dist(z[j], z[k]); k }
end

puts sum / [*1..N].inject(:*)