#include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
#define D10 fixed<<setprecision(10)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii;
const int MOD = 1000000007;
const int INF = MOD + 1;
const ld EPS = 1e-12;
template<class T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template<class T> T &chmax(T &a, const T &b) { return a = max(a, b); }

/*--------------------template--------------------*/

int n;
vi v;
double dp[22][222222];

ld solve(int i, int t)
{
	if (i == n) return 0;
	if (dp[i][t] >= 0) return dp[i][t];
	ld tmp = (abs(t - v[i]) / (ld)v[i]);
	ld res = INF;
	for (int j = 1;; j++)
	{
		ld nx = t*j;
		if (nx > v.back()*2) break;
		chmin(res, max(solve(i + 1, nx), tmp));
	}
	return dp[i][t] = res;
}

int main()
{
	MS(dp, -1);
	cin >> n;
	v.resize(n);
	REP(i, n) cin >> v[i];
	ld ans = INF;
	FOR(i, 1, v.back()+1)
	{
		chmin(ans, solve(0, i));
	}
	cout << D10 << ans << endl;
	return 0;
}