"use strict";

const permutateWithoutRepetitions = permutationOptions => {
  if (permutationOptions.length === 1) {
    return [permutationOptions];
  }

  // Init permutations array.
  const permutations = [];

  // Get all permutations for permutationOptions excluding the first element.
  const smallerPermutations = permutateWithoutRepetitions(permutationOptions.slice(1));

  // Insert first option into every possible position of every smaller permutation.
  const firstOption = permutationOptions[0];

  for (let permIndex = 0; permIndex < smallerPermutations.length; permIndex += 1) {
    const smallerPermutation = smallerPermutations[permIndex];

    // Insert first option into every possible position of smallerPermutation.
    for (let positionIndex = 0; positionIndex <= smallerPermutation.length; positionIndex += 1) {
      const permutationPrefix = smallerPermutation.slice(0, positionIndex);
      const permutationSuffix = smallerPermutation.slice(positionIndex);
      permutations.push(permutationPrefix.concat([firstOption], permutationSuffix));
    }
  }

  return permutations;
}
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0]);
    const xy = arg.slice(1, N + 1).map(n=>n.split(" ").map(l=>parseInt(l)));
    
    const combos = permutateWithoutRepetitions(xy);
    const results = [];
    
    for(let i in combos) {
        let temp = 0;
        
        for(let j=0; j<combos[i].length-1; j++) {

            let x = Math.pow(combos[i][~~j + 1][0] - combos[i][j][0], 2);
            let y = Math.pow(combos[i][~~j + 1][1] - combos[i][j][1], 2);

            temp += Math.sqrt(x + y);
        }

        results.push(temp)
    }
    
    console.log(results.reduce((m,n)=>m+n) / combos.length);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));