var GET = (function () {function f(s) {return new g(s);}function g(s) {this._s = s.trim().split("\n");}g.prototype.getValue = function (n) {return this._s[n];};g.prototype.getArray = function (n) {return this.stoa(this._s[n]);};g.prototype.slice = function (s, limit) {return this._s.slice(s, +limit + s || undefined).map(v => this.stox(v));};g.prototype.sliceArray = function (s, limit) {return this._s.slice(s, +limit + s || undefined).map(v => this.stoa(v));};g.prototype.stoa = function (s) {return s.split(" ").map(v => this.stox(v));};g.prototype.stox = function (v) {var i = +v;return (i === i) ? i : v;};return f;})();
var o = GET(require("fs").readFileSync("/dev/stdin", "utf8"));

function permutation(arr) {
    var permArr = [],
        usedChars = [];
    function permute(input) {
        var i, ch;
        for (i = 0; i < input.length; i++) {
            ch = input.splice(i, 1)[0];
            usedChars.push(ch);
            if (input.length == 0) {
                permArr.push(usedChars.slice());
            }
            permute(input);
            input.splice(i, 0, ch);
            usedChars.pop();
        }
        return permArr
    };

    return permute(arr);
}

console.log(main());
function main(){
    var N = o.getValue(0);
    var locations = o.sliceArray(1);

    var i = 0;

    var result = permutation(locations);

    var sum = 0;
    for(var i = 0; result.length > i; i++) {
        var record = result[i];
        for(var j = 0; record.length > j + 1; j++) {
            sum += Math.sqrt(Math.pow(record[j][0] - record[j + 1][0], 2) + Math.pow(record[j][1] - record[j + 1][1], 2));
        }
    }

    return sum / result.length
}
