#include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}


struct Precision{
  Precision(){
    cout<<fixed<<setprecision(12);
  }
}precision_beet;

//INSERT ABOVE HERE
signed main(){
  using D = double;
  int n;
  cin>>n;
  vector<D> as(n);
  for(int i=0;i<n;i++) cin>>as[i];

  const int MAX = 1e6;
  const D INF = 1e9;
  vector<D> dp(MAX,INF);
  for(int j=1;j<MAX;j++) dp[j]=abs(as[0]-j)/as[0];

  for(int i=0;i+1<n;i++){
    vector<D> nx(MAX,INF);
    for(int j=1;j<MAX;j++)
      for(int k=j;k<MAX;k+=j)
        chmin(nx[k],max(dp[j],abs(as[i+1]-k)/as[i+1]));
    swap(dp,nx);
  }

  cout<<*min_element(dp.begin(),dp.end())<<endl;
  return 0;
}

