while true do
   n = gets.chomp.to_f
   break if n == 0
   data_set = gets.chomp.split.map(&:to_f)

   sum = 0
   data_set.each do |data|
      sum += data
   end
   average = sum / n
   temp = 0
   data_set.each do |data|
      temp += (data - average) ** 2
   end
   var = temp / n
   puts (var ** 0.5)
end