#include<iostream>
#include<iomanip>
#include<cmath>
#define PI 3.14159265359
using namespace std;
int main(){
	int n,s;
	int *p;
	double avg,sg;
	
	while(cin>>n,n){
		avg=0;
		sg=0;
		p = new int[n];
		for(int i=0;i<n;++i){
			cin>>s;
			p[i]=s;
			avg+=s;
		}
		avg/=n;
		
		for(int i=0;i<n;++i){
			sg += ((p[i]-avg)*(p[i]-avg));
		}
		sg/=n;
		delete[]p;
		
		cout<<setprecision(20)<<sqrt(sg)<<endl;
	}
}