import Text.Printf

sd :: Double -> [Double] -> Double
sd n xs = sqrt $ (foldl (\a x -> a + (x - mean) ^ 2) 0 xs) / n
    where mean = (foldl (+) 0 xs) / n

solve :: [String] -> [Double]
solve [] = []
solve (s:ss)
    | s == "0"  = []
    | otherwise = sd (read s) (map read $ words (ss !! 0)) : solve (drop 1 ss)

main :: IO ()
main = interact (unlines . map (printf "%.8f") . solve . lines)