include Math

N = gets.to_i
town = N.times.map(&:to_i)
per = town.permutation.to_a
x, y = N.times.map{gets.split.map(&:to_i)}.transpose
sum = 0

per.each do |v|
  for i in 0..N-2 do
    dx = x[v[i]] - x[v[i+1]]
    dy = y[v[i]] - y[v[i+1]]
    sum += sqrt(dx**2 + dy**2)
  end
end

puts sprintf("%.10f", (sum / per.size))