n = gets.to_i
cities = Array.new(n){gets.split.map(&:to_i)}
routes = cities.permutation.to_a
sum = 0
routes.each do |r|
  (r.size-1).times do |i|
    a = r[i]
    b = r[i+1]
    sum += Math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
  end
end
p sum / routes.size
