#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const ll MOD = 1000000007;

const int MAX_V = 200002;
int a[22];
int N;
double memo[22][MAX_V];
bool visited[22][MAX_V];

double dfs(int pos, int prev){
    if(pos == N) return 0;
    if(visited[pos][prev]) return memo[pos][prev];
    double ret = 1e18;
    for(int i=1;prev*i<MAX_V;i++){
        int next = i * prev;
        ret = min(ret, max(abs(a[pos]-next) / double(a[pos]), dfs(pos+1, next)));
    }
    visited[pos][prev] = true;
    memo[pos][prev] = ret;
    return ret;
}

int main(){
    cin >> N;

    for(int i=0;i<N;i++){
        cin >> a[i];
    }
    printf("%.10f\n", dfs(0, 1));

    return 0;
}