import java.util.*

fun calcStandardDeviation(list: List<Int>): Double {
    val m = list.average()
    return Math.sqrt(list.map { Math.pow(it - m, 2.0) }.sum() / list.size)
}

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    val answer = mutableListOf<Double>()
    while (true) {
        val n = scanner.nextInt()
        if (n == 0) {
            break
        }
        val list = mutableListOf<Int>()
        (1..n).forEach {
            list.add(scanner.nextInt())
        }
        answer.add(calcStandardDeviation(list))
    }
    answer.forEach {
        println(it)
    }
}
