#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <cmath>
using namespace std;
#define EPS (1e-10)
#define EQ(a,b) (abs((a)-(b))<EPS)
double dp[21][200001];
const double INF=(1LL<<50);
int a[21];
int n;
double dfs(int idx,int lastNum){
    if(idx==-1)
        return 0.0;
    if(!EQ(INF,dp[idx][lastNum]))
        return dp[idx][lastNum];
    double minCost=INF;
    if(idx==n-1)
        for(int i = 1; i <= 150000; i++)
            minCost=min(minCost,max(dfs(idx-1,i),(double)abs(a[idx]-i)/a[idx]));
    else{
        // lastNumðèØéÅJÚ
        for(int i = 1; i*i <= lastNum; i++){
            if(lastNum%i==0){
                minCost=min(minCost,max(dfs(idx-1,i),(double)abs(a[idx]-i)/a[idx]));
                minCost=min(minCost,max(dfs(idx-1,(lastNum/i)),(double)abs(a[idx]-(lastNum/i))/a[idx]));
            }
        }
    }
    return dp[idx][lastNum]=minCost;
}

int main(){
    for(int i = 0; i < 21; i++)
        for(int j = 0; j < 200001; j++)
            dp[i][j]=INF;
    cin>>n;
    for(int i = 0; i < n; i++) cin>>a[i];
    double res=dfs(n-1,0);
    printf("%.9f\n",res);
    return 0;
}