//config = {stdin: 'tmp', newline: '\r\n'}; // win
config = {stdin: '/dev/stdin', newline: '\n'}; // linux

line = require('fs').readFileSync(config.stdin, 'ascii')
       .trim()
       .split(config.newline);

for (i = 0; line[i] !== '0'; i += 2)
  loop1(line[i + 1].split(' ').map(Number));

function loop1(ary) {
  var n = ary.length;
  var mean = ary.reduce(add, 0) / n;
  var div = ary.reduce(function (prev, cur) {
    return prev + (cur - mean) * (cur - mean);
  }, 0);
  console.log(Math.sqrt(div / n));
}

function add(a, b) { return a + b; }