

object Main extends App {
  override def main(args: Array[String]): Unit = {
    Iterator.continually(new DataFactory(io.StdIn.readLine.toInt))
      .takeWhile(_.continue)
      .map(_.read.sigma).foreach(println)
  }

  class DataFactory(n: Int) {
    val continue = n != 0;
    def read(): Data = {
      val list = io.StdIn.readLine.split(' ').toList.map(_.toInt)
      new Data(n,list)
    }
  }
  class Data(n:Int , list : List[Int]) {
    val sum = list.sum.toDouble
    val mean:Double = sum/n.toDouble
    
    val sigma = Math.sqrt( list.map( si =>  (si.toDouble - mean)*(si.toDouble-mean) ).sum /n.toDouble )
    
  }
}