#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}

const long double EPS = 1e-10;
const long long INF = 1e18;
const long double PI = acos(-1.0L);
//const ll mod = 1000000007;

long double dp[21][201000];
ll N;
ll a[20];

void update(int idx) {
    for(int before = 1; before <= 2e5; before++) {
        for(int after = before; after <= 2e5; after += before) {
            long double delta = abs(after - a[idx]);
            chmin(dp[idx+1][after], max(dp[idx][before], delta / a[idx]));
        }
    }
}

int main() {
    //cout.precision(10);
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> N;
    for(int i = 0; i < N; i++) cin >> a[i];
    for(int i = 0; i <= N; i++) {
        for(int j = 0; j <= 2e5; j++) {
            dp[i][j] = 1e8;
        }
    }
    dp[0][1] = 0;
    for(int i = 0; i < N; i++) {
        update(i);
        //for(int j = 1; j <= 30; j++) cerr << dp[i+1][j] << " ";
        //cerr << endl;
    }
    long double ans = 1e18;
    for(int i = 1; i <= 2e5; i++) {
        chmin(ans, dp[N][i]);
    }
    cout << fixed << setprecision(30) << ans << endl;
    return 0;
}
