import Control.Monad
import Data.List
import qualified Data.Vector.Unboxed.Mutable as UMVector
import qualified Data.Vector.Unboxed as UVector
import qualified Data.Vector as Vector

toTaple (x:y:_) = (x, y)

average :: (Fractional a) => [a] -> a
average [] = 0
average xs = sum' / fromIntegral count
	where
		(sum', count) = foldr sumCount (0, 0) xs
		sumCount x (sum', count) = (sum' + x, count + 1)

routes :: [Int] -> [(Int, Int)]
routes (from:to:xs) = (from, to) : routes (to:xs)
routes _ = []

distance :: (Double, Double) -> (Double, Double) -> Double
distance from to = sqrt $ (x - x') ^ 2 + (y - y') ^ 2
	where
		(x, y) = from
		(x', y') = to

calc :: Vector.Vector (Double, Double) -> [(Int, Int)] -> Double
calc points rs = sum $ do
	(from, to) <- rs
	return $ distance (points Vector.! from) (points Vector.! to)


main :: IO ()
main = do
	n <- readLn :: IO Int
	xys <- Vector.fromList . map (toTaple . map read . words) . take n . lines <$> getContents :: IO (Vector.Vector (Double, Double))
	-- print xys
	let rs = (map routes $ permutations ([0..(n-1)] :: [Int])) :: [[(Int, Int)]]
	-- print rs
	print $ average $ do
		route <- rs
		return $ calc xys route
