const input = require('fs').readFileSync('/dev/stdin', 'utf8').split(/\n/);
for (let i=0; i<input.length; i+=2) {
    if (input[i] === '0') {
        break;
    }
    let num = input[i+1].split(/\s/).map(Number);
    let tmp = 0;
    for (let j=0; j<num.length; j++) {
        tmp += num[j]; 
    }
    let ave = tmp / input[i];
    let tmp2 = 0;
    for (let j=0; j<num.length; j++) {
        tmp2 += Math.pow(ave-num[j], 2); 
    }
    let dev = (Math.sqrt(tmp2 / input[i])).toFixed(8);
    console.log(dev);
}


