ARGF.each do |line|
  a = line.to_i

  break if a == 0
  
  b = line.split.map(&:to_i)

  z = 0
  ave = b.inject(0.0){|r,i| r+=i } / a
  b.each do |p|
    z += (p - ave) ** 2
  end

  puts Math.sqrt(z / a)
end