#include <bits/stdc++.h>
#define REP(i, a, n) for(ll i = ((ll) a); i < ((ll) n); i++)
using namespace std;
typedef long long ll;

const double EPS = 1e-10;

ll N, A[20];
bool dp[21][200001];

bool ok(double x) {
  REP(i, 0, N + 1) REP(j, 0, 200001) dp[i][j] = false;
  REP(i, 0, 200001) dp[0][i] = true;

  REP(i, 0, N) {
    REP(j, 1, 200001) if(dp[i][j]) {
      double e = (double) abs(A[i] - j) / A[i];
      if(e < x + EPS) {
        for(ll k = j; k < 200001; k += j) {
          dp[i + 1][k] = true;
        }
      }
    }
  }

  bool ret = false;
  REP(i, 0, 200001) ret = ret || dp[N][i];
  return ret;
}

int main(void) {
  cin >> N;
  REP(i, 0, N) cin >> A[i];

  double l = -1, h = 1e20;
  REP(_, 0, 100) {
    double m = (l + h) / 2;
    if(ok(m)) h = m; else l = m;
  }
  printf("%.15lf\n", h);
}
