import Control.Applicative
import Data.Function
import Control.Monad
import Data.List
import Data.Char
import Text.Printf

sd :: Double -> [Double] -> Double
sd n s = sqrt $ (sum $ map ((^2) . subtract m) s) / n
    where m = sum s / n


main :: IO ()
main = fix $ \loop -> do
    n <- readLn
    unless (n == 0) $ do
        s <- map read . words <$> getLine
        printf "%.10f\n" $ sd n s
        loop
