def getAverage(points)
  sum = 0
  points.each {|x|
    sum += x
  }
  return (sum / points.length).to_f
end

while true
  n = STDIN.gets.to_i
  if n == 0 then break end
  str = STDIN.gets.split(" ")
  point = Array.new(n) { |i|  i = str[i].to_i}

  average = getAverage(point)
  s = 0.0
  for i in 0..point.length - 1 do
    s += (point[i] - average) * (point[i] - average)
  end
  s = Math.sqrt(s / n)
  puts s
end