#include<iostream>
#include<cstdio>
using namespace std;
double ans,radio;
int ori[22],a[22],n;
void dfs(int i,double maxr)
{
    if (i==n){ans=maxr;return;}
    int add,sub,now=a[i];
    if (a[i]>a[i-1])
    {
        add=a[i-1]-now%a[i-1];
        sub=a[i]%a[i-1];
        while (true)
        {
            a[i]=now-sub;
            if (double(sub)/(double)ori[i]>ans||a[i]<a[i-1])break;
            dfs(i+1,max(maxr,double(sub)/(double)ori[i]));
            sub+=a[i-1];
        }
    }
    else add=a[i-1]-a[i];
    while (true)
    {
        if ((double)add/(double)ori[i]>ans)break;
        a[i]=now+add;
        dfs(i+1,max(maxr,(double)add/(double)ori[i]));
        add+=a[i-1];
    }
    a[i]=now;
}
int main()
{
    while (scanf("%d",&n)!=EOF)
    {
        for (int i=0;i<n;i++)
        {
            scanf("%d",&ori[i]);
            a[i]=ori[i];
        }
        ans=1e18;
        dfs(1,0);
        int add=1;
        while (true)
        {
            radio=(double)add/(double)ori[0];
            if (radio>ans)break;
            a[0]=ori[0]+add;
            dfs(1,radio);
            a[0]=ori[0]-add;
            dfs(1,radio);
            add++;
        }
        printf("%.10lf\n",ans);
    }
    return 0;
}