#include<bits/stdc++.h>
using namespace std;
int main(){
int n,max=0,min=100000000,t;
cin >> n;
int x[n];
for (int i=0;i<n;i++){
cin >> x[i];
}
for (int i=0;i<n;i++){
cin >> t;
if (min>=x[i]-t) min=x[i]-t;
if (max<=x[i]+t) max=x[i]+t;
}
double x0;
x0=(min+max)*1.0/2;
printf("%.1lf",x0);
return 0;
}