while (n = gets(chomp:true).to_i) != 0
  scores = []
  scores = gets.split.map(&:to_i)

  # 平均値(scoresの合計/n)
  average = scores.inject(&:+) / n

  # 偏差(scores - 平均値)**2
  deviation = scores.map do |score|
    (score - average)**2
  end

  # 分散(偏差 / n)
  dispersion = deviation.inject(&:+).to_f / n

  # 標準偏差(分散の平方根)
  square_root = dispersion**(1/2.0)

  puts square_root.round(5)
end
