import qualified Control.Monad as M
import qualified Data.List as L
average xs = sum xs / (fromIntegral $ length xs)

path table (_:[]) = 0
path table (a:b:xs) = sqrt ((x1-x2)^2+(y1-y2)^2) + (path table (b:xs))
 where
  [x1,y1] = table !! a
  [x2,y2] = table !! b

main = do
 n <- readLn :: IO Int
 arr<-map ((map read).words)<$> M.replicateM n getLine :: IO [[Double]]
 print $ average [path arr xs|xs<-L.permutations [0..n-1]]