#include<bits/stdc++.h>
using namespace std;
#define ref(i,n) for(long long i=0;i<n;i++)
typedef long double lb;
typedef long long ll;



long long n,bb[200001],t,c[200001];
long double a[200001],aa[200001],b[200001],ma=0,d[200001],sh[200001];


int main()
{
    cin>>n;
    ref(i,n) {
        cin>>aa[i];
        if(aa[i]>ma) t=i;
        ma=max(aa[i],ma);
    }

    ref(i,n) cin>>bb[i];

    ref(i,n) {a[i]=aa[(i+t)%n];b[i]=bb[(i+t)%n];}

    a[n]=a[0];

    long long k=0;
    ref(i,n-1) k+=2*b[i+1]*(n-i-1);
    d[1]=-1*(lb(k)/lb(n));
    ref(i,n-1) {d[i+2]=2*d[i+1]-d[i]+2*b[i+1];}
    //cout<<d[n-1]<<endl;
    //cout<<d[n]<<endl;

    ref(i,n) a[i]=a[i]-d[i];

    c[0]=0,sh[0]=0;
    for(int i=1;i<=n;i++) {

        ll t=i-1;
        c[i]=i-1;

        while(true){


            if(sh[t]<(a[i]-a[t])/(i-t)) {t=c[t];c[i]=t;sh[i]=(a[i]-a[t])/(i-t);}
            else {sh[i]=(a[i]-a[t])/(i-t);break;}
            if(t==0) break;
    }

    }

    for(int i=n;i>0;i--) {
        for(int j=c[i]+1;j<i;j++) a[j]=a[c[i]]+(a[i]-a[c[i]])/lb(i-c[i])*lb(j-c[i]);
        i=c[i]+1;
    }

    long double ans=0;

    ref(i,n){
        ans+=a[i]+d[i];
    }
    lb tt;
    tt=ans/lb(n);
    if(ll(tt*pow(10,11))%10>=5) tt+=pow(10,-10);
    cout<<fixed<<setprecision(40)<<tt;
    return 0;
}


