fun main(args: Array<String>) {
    while (true) {
        val datasetNum = readLine()!!.toInt()
        if (datasetNum == 0) {
            break
        }
        val dataset = readLine()!!.split(" ").map(String::toDouble)
        val mean = dataset.sum() / datasetNum
        val variance = dataset.map { Math.pow((it - mean), 2.0) }.sum() / datasetNum
        println("${Math.sqrt(variance)}")
    }
}

