#include <bits/stdc++.h>

using namespace std;

double dp[21][200001];

int main()
{
	int N;
	int A[21];
	
	A[0] = 1;
	
	scanf("%d", &N);
	
	fill(dp[0], dp[0] + 200001, 200000);
	for (int i = 1; i <= N; i++){
		scanf("%d", A + i);
		fill(dp[i], dp[i] + 200001, 200000);
	}
	
	dp[0][1] = 0;
	
	for (int i = 0; i < N; i++){
		for (int j = 1; j <= 200000; j++){
			for (int k = j; k <= 200000; k += j){
				dp[i + 1][k] = min(dp[i + 1][k], max(dp[i][j], abs(k - A[i + 1]) * 1.0 / A[i + 1]));
			}
		}
	}
	
	printf("%.10lf\n", *min_element(dp[N], dp[N] + 200000));
	
	return (0);
}