
N = gets.to_i

cities = []
N.times do |c|
  city = gets.chomp.split(" ").map(&:to_i)
  cities << city
end

length = 0
perm = cities.permutation(N).to_a
perm.each do |routes|
  routes.each_cons(2) do |r1, r2|
    length += Math.sqrt((r2[0]-r1[0])**2+(r2[1]-r1[1])**2)
  end
end

p length/perm.length