//#pragma comment(linker,"/STACK:1024000000,1024000000")
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<cstdlib>
#include<queue>
#include<stack>
#include<utility>
#include<map>
#include<set>
#include<vector>
#include<algorithm>
typedef long  long LL;

const int N = 200005;
const int M = 30;
const int inf = 1<<28;
const double eps = 1e-8;
using namespace std;
typedef pair<int,int> PII;
int n,a[N];
double dp[22][N];

void input(){
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
    }
}

double DP(){
    for(int i=1;i<=n;i++){
        for(int j=1;j<=N-5;j++) dp[i][j]=-1.0;
    }
    for(int i=1;i<=N-5;i++){
        dp[1][i]=1.0*abs(a[1]-i)/a[1];
    }
    for(int i=1;i<n;i++){
        for(int j=1;j<=N-5;j++){
            if(dp[i][j]<0) continue;
//            if(i==n){
//                printf("dp[%d][%d]=%.6f\n",i,j,dp[i][j]);
//                continue;
//            }
            for(int k=j;k<=N-5;k+=j){
                double tmp=max(1.0*abs(a[i+1]-k)/a[i+1],dp[i][j]);
//                cout<<i+1<<" "<<k<<" "<<tmp<<endl;
                if(dp[i+1][k]<0) dp[i+1][k]=tmp;
                else dp[i+1][k]=min(dp[i+1][k],tmp);
            }
        }
    }
    double res=1e50;
    for(int i=1;i<=N-5;i++){
        if(dp[n][i]<0) continue;
        res=min(res,dp[n][i]);
    }
    return res;
}

int main(){
    //freopen("in","r",stdin);
    while(scanf("%d",&n)>0){
        input();
        printf("%.10f\n",DP());
    }
    return 0;
}