#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cassert>
#include<climits>

#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define IINF (INT_MAX)
#define MAX 200000

using namespace std;

double dp[20][MAX];
int N;
double input[20];

int main(){

  cin >> N;
  rep(i,N)cin >> input[i];

  rep(i,N)rep(j,MAX)dp[i][j] = IINF;

  rep(i,MAX){
    dp[0][i] = abs(input[0]-i)/input[0];
  }
 
  rep(i,N-1){
    REP(j,1,MAX){
      if(dp[i][j] == IINF)  continue;
      for(int k=j;k<MAX;k+=j){
	dp[i+1][k] = min(dp[i+1][k],
			 max(dp[i][j],abs(input[i+1]-k)/input[i+1]));
      }
    }
  }


  double ans = IINF;
  rep(i,MAX){
    ans = min(ans,dp[N-1][i]);
  }

  printf("%.12f\n",ans);
  return 0;
}