#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>

using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);

#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, s, n) for (int i = (s); i < (int)(n); i++)
#define FOREQ(i, s, n) for (int i = (s); i <= (int)(n); i++)
#define FORIT(it, c) for (__typeof((c).begin())it = (c).begin(); it != (c).end(); it++)
#define MEMSET(v, h) memset((v), h, sizeof(v))

int n;
int current[30];
double memo[20][200020];

double calc(int depth, int prev) {
  if (depth == n) { return 0.0; }
  if (!isnan(memo[depth][prev])) { return memo[depth][prev]; }
  double ret = 1e+100;
  int nv = prev;
  while (nv <= 200010) {
    ret = min(ret, max(calc(depth + 1, nv), (double)abs(current[depth] - nv) / current[depth]));
    nv += prev;
  }
  return memo[depth][prev] = ret;
}

int main() {
  while (scanf("%d", &n) > 0) {
    MEMSET(memo, -1);
    REP(i, n) {
      scanf("%d", &current[i]);
    }
    sort(current, current + n);
    double ans = 1e+100;
    FOREQ(i, 1, 200010) {
      ans = min(ans, calc(0, i));
    }
    printf("%.9f\n", ans);
  }
}