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

#define rep(i,x,y) for(int i=(x);i<(y);++i)
#define debug(x) #x << "=" << (x)

#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define show(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define show(x)
#endif

typedef long long int ll;
typedef pair<int,int> pii;
template<typename T> using vec=std::vector<T>;

const int inf=1<<30;
const long long int infll=1LL<<62;
const double eps=1e-9;
const int dx[]={1,0,-1,0},dy[]={0,1,0,-1};

template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec){
    os << "[";
    for (const auto &v : vec) {
    	os << v << ",";
    }
    os << "]";
    return os;
}

void solve(){
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i,0,n) cin >> a[i];

    int maxi=2*1e5;
    vector<long double> curr(maxi,infll),next(maxi,infll);
    rep(i,1,maxi) curr[i]=(long double)(abs(a[0]-i))/a[0];
    rep(i,0,n-1){
        rep(j,1,maxi){
            for(int k=j; k<maxi; k+=j){
                next[k]=min(next[k],max(curr[j],(long double)(abs(a[i+1]-k))/a[i+1]));
            }
        }
        swap(curr,next);
        fill(next.begin(),next.end(),infll);
    }
    cout << *min_element(curr.begin(),curr.end()) << endl;
}

int main(){
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    cout.setf(ios::fixed);
    cout.precision(12);
    solve();
    return 0;
}