let split str delim =
  let rec doit s acc =
    match
      try Some (String.index s delim)
      with _ -> None
    with
    | None -> s :: acc
    | Some i ->
        let s1 = String.sub s 0 i in
        let s2 = String.sub s (i + 1) (String.length s - String.length s1 - 1) in
        doit s2 (s1 :: acc)
  in
  List.rev (doit str [])

let sum lst = List.fold_left (fun acc s -> acc +. s) 0. lst

let sd n lst =
  let n = float_of_int n in
  let m = sum lst /. n in
  sqrt (sum (List.map (fun s -> (s -. m)*.(s -. m)) lst) /. n)

let () =
  let rec doit () =
    match read_int () with
    | 0 -> ()
    | n -> begin
        let l = read_line () in
        let lst = List.map float_of_string (split l ' ') in
        Printf.printf "%f\n" (sd n lst);
        doit ();
      end
  in
  doit ()