#include <bits/stdc++.h>
#define N 30
using namespace std;
int n,A[N];
double calc(double a,double b){return abs(a-b)/a;}

double DP(){
  unordered_map<int,double> dp[2];
  bool f=0;  
  dp[0][1] = 0;
  for(int i=0;i<n;i++,f=!f){
    dp[!f].clear();
    for(auto it = dp[f].begin();it!=dp[f].end();it++){
      int num = it->first;
      double cost = it->second;
      for(int j=num;;j+=num){
	if(dp[!f].count(j))dp[!f][j] = min(dp[!f][j],max(calc(A[i],j),cost));
	else dp[!f][j] = max(calc(A[i],j),cost);
	if(j>A[n-1]) break;
      }
    }
  }

  double res=1LL<<55;
  for(auto it = dp[f].begin();it!=dp[f].end();it++)res=min(res,it->second);
  return res;
}

int main(){
  cin>>n;
  for(int i=0;i<n;i++)cin>>A[i];
  printf("%.10f\n",DP());
  return 0;
}