#!/usr/bin/ruby
# -*- coding: utf-8 -*-
=begin
ITP1_10-C

Math Functions - Standard Deviation
Time Limit : 1 sec, Memory Limit : 65536 KB
?¨??????????

n ????????????????????????????????§????????°???????????°???????¨?????????£??????????????????????????????s1, s2 ... sn??¨????????¨??????????¨??????????????±???????????????°????????????????????????

??????????????????????????¨????????°????????£?±2?????\???????????§???????????????

?±2 = (???ni=1(si - m)2)/n

?????£?????£????????????????¨???????????±??¨?????????
Input

?????°??????????????????????????\?????¨??????????????????????????????????????????????????\????????¢?????§??????????????????

???????????° n
s1 s2 ... sn

n ??? 0 ?????¨?????\?????????????????¨?????????
Output

?????????????????????????????????????¨?????????????????????????????????????????????????0.0001??\????????????????????£???????????????
Constraints

    ??\?????§??????????????? n ???1000????¶????????????¨????????????
    0 ??? si ??? 100

Sample Input

5
70 80 100 90 20
3
80 80 80
0

Sample Output

27.85677655
0.00000000

=end

class Main
  def initialize
    fh = STDIN
    while fh.gets do
      n = $_.chomp.to_i
      break if n==0 
      fl = fh.gets.chomp.split.map{|x| x.to_f}
      puts stddev(fl)
    end
  end

  def stddev(f)
    n = f.length
    sum = f.inject(0.0){|acc,x| acc + x}
    ave = sum / n
    sq_sum = f.inject(0.0){|acc,x| acc + (x - ave)**2}
    Math.sqrt(sq_sum / n) 
  end
end

if $0==__FILE__ then
  Main.new()
end