let content = '';
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', buf => {
  content += buf;
});

process.stdin.on('end', () => {
  let lines = content.trim().split('\n');
  let cur = 0;
  while (lines[cur] !== '0') {
    const numStudents = parseInt(lines[cur++], 10);
    const scores = lines[cur++].split(' ').map(n => parseInt(n, 10));
    const sum = scores.reduce((prev, cur) => prev + cur);
    const avg = sum / numStudents;

    const result = Math.sqrt(
      scores.reduce((prev, cur) => prev + Math.pow(cur - avg, 2), 0) / numStudents
    );

    console.log(result);
  }
});

