#include<cstdio>
#include<algorithm>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int n,a[21];

bool isOK(int i,double ub){
	if(i==n) return true;

	bool f;
	int tmp;
	for(int b=(a[i]+a[i-1]-1)/a[i-1]*a[i-1];abs(a[i]-b)<ub*a[i];b+=a[i-1]){
		tmp=a[i];
		a[i]=b;
		f=isOK(i+1,ub);
		a[i]=tmp;
		if(f) return true;
	}
	for(int b=a[i]/a[i-1]*a[i-1];abs(a[i]-b)<ub*a[i];b-=a[i-1]){
		if(b<a[i-1]) break;
		tmp=a[i];
		a[i]=b;
		f=isOK(i+1,ub);
		a[i]=tmp;
		if(f) return true;
	}
	return false;
}

int main(){
	scanf("%d",&n);
	rep(i,n) scanf("%d",a+i+1);
	a[0]=1; n++;

	double lo=0,hi=0;
	for(int i=1;i<n-1;i++){
		int prev=a[i]/a[i-1]*a[i-1];
		hi=max(hi,(double)abs(a[i+1]-a[i+1]/prev*prev)/a[i+1]);
	}
	rep(_,100){
		double mi=(lo+hi)/2;
		if(isOK(1,mi)) hi=mi; else lo=mi;
	}
	printf("%.15f\n",lo,hi);

	return 0;
}