#include <vector>
#include <iostream>
#include <algorithm>
#pragma warning(disable : 4996)
using namespace std;
int n, a[20], t; double dp[20][200000]; vector<int> s[200000];
int main() {
	scanf("%d", &n);
	for (int i = 0; i < n; i++) scanf("%d", &a[i]), t = max(t, a[i]);
	for (int i = 1; i < 2 * t; i++) {
		for (int j = i; j < 2 * t; j += i) {
			s[j].push_back(i);
		}
	}
	for (int i = 1; i < 2 * t; i++) dp[0][i] = 1.0 * abs(a[0] - i) / a[0];
	for (int i = 1; i < n; i++) {
		for (int j = 1; j < 2 * t; j++) {
			dp[i][j] = 1.0;
			for (int k = 0; k < s[j].size(); k++) {
				dp[i][j] = min(dp[i][j], max(dp[i - 1][s[j][k]], 1.0 * abs(a[i] - j) / a[i]));
			}
		}
	}
	double ret = 1.0;
	for (int i = 1; i < 2 * t; i++) {
		ret = min(ret, dp[n - 1][i]);
	}
	printf("%.9f\n", ret);
	return 0;
}