#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_10_C

class Array
  # ????´????to_i?????????????????????????????????
  def avg
    inject(0.0){|r,i| r+=i.to_i }/size
  end
  # ????´????to_i?????????????????£???????????????
  def variance
    a = avg
    inject(0.0){|r,i| r+=(i.to_i-a)**2 }/size
  end
  # ????´????to_i?????????????¨?????????????????????????
  def standard_deviation
    Math.sqrt(variance)
  end
end

while true do
    n = gets.to_i
    break if n==0
    puts gets.split.map(&:to_i).standard_deviation
end