#include <iostream>
#include <cstdio>
#include <vector>
#include <queue>
#include <cmath>
#include <algorithm>
#include <functional>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
#define rep1(i,n) for(int i=1;i<=(n);++i)
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl;
int n,a[20];
double dp[21][200000],inf=1e10;
int main(){
	cin>>n;
	rep(i,n)cin>>a[i];
	rep(i,n+1) rep(j,200000) dp[i][j]=inf;
	dp[0][1]=0;
	rep(i,n){
		rep1(j,200000-1){
			for(int k=1;k*j<200000;k++){
				double dif=abs((double)(a[i]-k*j)/a[i]);
				dp[i+1][k*j]=min(dp[i+1][k*j],max(dp[i][j],dif));
			}
		}
	}
	double ans=inf;
	rep(j,200000) ans=min(ans,dp[n][j]);
	printf("%.10f\n",ans);
}