private var count = 0
private var cumulativeLen = 0.0

fun main(args: Array<String>) {
    val nLine = readLine()!!.toInt()
    val locList = mutableListOf<Array<Int>>()
    for (i in 0..nLine-1) {
        val token = readLine()!!.split(" ")
        val loc = arrayOf(token[0].toInt(), token[1].toInt())
        locList.add(loc)
    }
    genPattern(locList, listOf<Array<Int>>())
    val averageLen = cumulativeLen / count.toDouble()
    println(averageLen)
}

private fun genPattern(numbers: List<Array<Int>>, pattern: List<Array<Int>>) {
    if (numbers.size == 0) {
        val len = calcLength(pattern)
        cumulativeLen += len
        count++
        return
    }

    for (i in 0..numbers.size-1) {
        val newList = mutableListOf<Array<Int>>()
        newList.addAll(numbers)
        newList.removeAt(i)
        val newPattern = mutableListOf<Array<Int>>()
        newPattern.addAll(pattern)
        newPattern.add(numbers[i])
        genPattern(newList as List<Array<Int>>, newPattern)
    }
}

private fun calcLength(pattern: List<Array<Int>>): Double {
    var totalLen = 0.0
    for (i in 0..pattern.size-2) {
        val x1 = pattern[i][0]
        val x2 = pattern[i+1][0]
        val y1 = pattern[i][1]
        val y2 = pattern[i+1][1]
        val len = Math.sqrt(
            ((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)).toDouble()
        )
        totalLen += len
    }
    return totalLen
}