// #define _GLIBCXX_DEBUG // for STL debug (optional)
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
using namespace std;
using ll = long long int;
using int64 = long long int;
 
template<typename T> void chmax(T &a, T b) {a = max(a, b);}
template<typename T> void chmin(T &a, T b) {a = min(a, b);}
template<typename T> void chadd(T &a, T b) {a = a + b;}
 
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
const int INF = 1001001001;
const ll LONGINF = 1001001001001001LL;
const ll MOD = 1000000007LL;

const int MAXK = 300010;
double dp[21][MAXK + 10];
int main() {
    int N; cin >> N;
    vector<int> A(N);
    for(int i=0; i<N; i++) cin >> A[i];

    fill(dp[0], dp[N+1], LONGINF);
    for(int i=1; i<=MAXK; i++) {
        dp[1][i] = 1.0 * abs(A[0] - i) / A[0];
    }

    for(int i=1; i<N; i++) {
        for(int j=1; j<=MAXK; j++) {
            for(int k=j; k<=MAXK; k+=j) {
                chmin(dp[i+1][k], max(dp[i][j], 1.0 * abs(A[i] - k) / A[i]));
            }
        }
    }

    double ans = *min_element(dp[N], dp[N] + MAXK + 1);
    printf("%.12f\n", ans);
    return 0;
}

