require 'bigdecimal'
def calc_standard_dev(scores)
  length = scores.length
  avarage = scores.inject(:+)/length
  BigDecimal(avarage.to_s).floor(8).to_f
  tmp = 0
  for i in 0..(length-1)
    tmp += (scores[i]- avarage)**2
  end
  standard_dev = (tmp/length)**0.5
  return standard_dev
end


answers = []
loop do
  n = gets.chomp.to_i
  if n == 0
    break
  else
  scores = gets.chomp.split.map(&:to_i)
  answers.push(calc_standard_dev(scores))
  end
end
length = answers.length
for i in 0..(length-1)
  puts answers[i]
end