require 'complex'

n = gets.to_i
array = []
n.times do
  array << gets.split(" ").map(&:to_i)
end

routes = []
(1..n).to_a.permutation(n) do |route|
  routes << route
end

total = 0
routes.each do |route|
  (1...route.length).each do |i|
    total += Math.sqrt((array[route[i - 1] - 1][0] - array[route[i] - 1][0]).abs ** 2 + (array[route[i - 1] - 1][1] - array[route[i] - 1][1]).abs ** 2)
  end
end

puts total / routes.length.to_f