while (n = gets.to_i) != 0
scores = gets.split.map(&:to_i)
n = scores.size

sum1 = 0
scores.each {|s| sum1 += s}
m = sum1 / n.to_f

sum2 = 0
scores.each {|s| sum2 += (s - m)**2}
a = Math::sqrt(sum2 / n)

p a
end
