import scala.math.sqrt
import scala.io.Source

object Main extends App {
  val src: Iterator[String] = Source.stdin.getLines

  def deviator(n: Int, li: List[Int]) = {
    def predicate(a: Int, b: Int): Int = {
      val avg = li.sum / n
      a + (b-avg)*(b-avg)
    }

    sqrt(li.foldLeft(0)(predicate) / n)
  }

  for (n <- src if src.hasNext) {
    val li = src.next.split(" ").map(_.toInt).toList
    println(deviator(n.toInt, li))
  }
}