#include <bits/stdc++.h>
using namespace std;

constexpr double INF = 1e9;
constexpr int MAX = 2e5;

int main() {
    int N;
    cin >> N;
    vector<int> a(N);
    for(int i=0; i<N; ++i) {
        cin >> a[i];
    }
    vector<vector<double>> dp(N+1, vector<double>(MAX, INF));
    for(int i=0; i<MAX; ++i) {
        dp[0][i] = 0;
    }
    for(int i=0; i<N; ++i) {
        for(int j=1; j<MAX; ++j) {
            for(int k=1; j*k < MAX; ++k) {
                dp[i+1][j*k] = min(dp[i+1][j*k], max(dp[i][j], abs((double)a[i] - j*k) / a[i]));
            }
        }
    }
    cout << fixed << setprecision(10) << *min_element(dp[N].begin(), dp[N].end()) << endl;
}
