/*
 * 2305.cc: Beautiful Currency
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 20;
const int MAX_A = 100000 * 2;

const double DINF = 1e30;

/* typedef */

/* global variables */

int as[MAX_N];
double dp[MAX_N + 1][MAX_A + 1];

/* subroutines */

inline double cratio(int a, int b) { return (double)abs(a - b) / a; }

/* main */

int main() {
  int n;
  cin >> n;

  for (int i = 0; i < n; i++) cin >> as[i];

  for (int j = 1; j <= MAX_A; j++) dp[0][j] = cratio(as[0], j);
  for (int i = 1; i < n; i++)
    for (int j = 1; j <= MAX_A; j++) dp[i][j] = DINF;

  for (int i = 0; i < n - 1; i++)
    for (int j = 1; j <= MAX_A; j++)
      if (dp[i][j] < DINF)
	for (int k = j; k <= MAX_A; k += j) {
	  double dp0 = max(dp[i][j], cratio(as[i + 1], k));
	  if (dp[i + 1][k] > dp0) dp[i + 1][k] = dp0;
	}

  double mindp = DINF;
  for (int j = 1; j <= MAX_A; j++)
    if (mindp > dp[n - 1][j]) mindp = dp[n - 1][j];

  printf("%.12lf\n", mindp);
  return 0;
}