#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
using namespace std;
const long long N = 100000 + 10;
const long long MOD = 1000000000 + 7;
const long long INF = 100000000000010;
const long long LOG = 20;
long long n, a[N], d[N], D[N], suf[N], pre[N], R[N], L[N], val[N], seg[N << 2];
long long Ceil(long long a, long long c) {
  if (a % c == 0) return a / c;
  return a / c + 1;
}
void Set(long long id, long long lq, long long rq, long long x, long long l,
         long long r) {
  if (rq <= l || r <= lq) return;
  if (lq <= l && r <= rq) {
    seg[id] = x;
    return;
  }
  long long md = (l + r) >> 1;
  Set(id << 1, lq, rq, x, l, md);
  Set(id << 1 | 1, lq, rq, x, md, r);
  seg[id] = max(seg[id << 1], seg[id << 1 | 1]);
  return;
}
long long BS(long long id, long long l, long long r, long long x) {
  if (r - l == 1) return l;
  long long md = (l + r) >> 1;
  if (seg[id << 1 | 1] >= x) return BS(id << 1 | 1, md, r, x);
  return BS(id << 1, l, md, x);
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  set<pair<long long, long long> > st;
  set<long long> Act;
  for (long long i = 1; i <= n + 2; i++) cin >> a[i];
  for (long long i = 2; i <= n + 1; i++) cin >> D[i];
  D[1] = INF, D[n + 2] = INF;
  pre[1] = 1;
  L[1] = 1;
  d[1] = INF;
  st.insert({INF, 1});
  R[1] = 1;
  val[1] = INF;
  pre[1] = 1;
  for (long long i = 2; i <= n + 2; i++) {
    R[i - 1] = i;
    d[i] = INF;
    d[i - 1] = D[i - 1];
    st.erase({val[i - 1], i - 1});
    val[i - 1] = d[i - 1] - Ceil(a[R[i - 1]] - a[L[i - 1]], 2);
    st.insert({val[i - 1], i - 1});
    st.insert({INF, i});
    L[i] = i - 1;
    R[i] = i;
    val[i] = INF;
    while ((*st.begin()).first < 0) {
      pair<long long, long long> fr = *st.begin();
      st.erase(fr);
      long long r = R[fr.second], l = L[fr.second];
      L[r] = l, R[l] = r;
      st.erase({val[l], l});
      st.erase({val[r], r});
      val[r] = d[r] - Ceil(a[R[r]] - a[L[r]], 2);
      val[l] = d[l] - Ceil(a[R[l]] - a[L[l]], 2);
      st.insert({val[l], l});
      st.insert({val[r], r});
    }
    pre[i] = L[i];
  }
  if (st.size() != 2) return cout << 0, 0;
  st.clear();
  d[n + 2] = INF;
  R[n + 2] = n + 2;
  L[n + 2] = n + 2;
  val[n + 2] = INF;
  st.insert({val[n + 2], n + 2});
  suf[n + 2] = n + 2;
  for (long long i = n + 1; i >= 1; i--) {
    L[i + 1] = i;
    d[i] = INF;
    d[i + 1] = D[i + 1];
    st.erase({val[i + 1], i + 1});
    val[i + 1] = d[i + 1] - Ceil(a[R[i + 1]] - a[L[i + 1]], 2);
    st.insert({val[i + 1], i + 1});
    st.insert({INF, i});
    L[i] = i;
    R[i] = i + 1;
    val[i] = INF;
    while ((*st.begin()).first < 0) {
      pair<long long, long long> fr = *st.begin();
      st.erase(fr);
      long long r = R[fr.second], l = L[fr.second];
      L[r] = l, R[l] = r;
      st.erase({val[l], l});
      st.erase({val[r], r});
      val[r] = d[r] - Ceil(a[R[r]] - a[L[r]], 2);
      val[l] = d[l] - Ceil(a[R[l]] - a[L[l]], 2);
      st.insert({val[l], l});
      st.insert({val[r], r});
    }
    suf[i] = R[i];
  }
  for (long long i = 1; i <= n + 2; i++) {
    long long x = 2 * D[i] + a[pre[i]];
    R[i] = x;
    if (R[i] <= a[i]) R[i] = -INF;
  }
  for (long long i = 0; i < (N << 2); i++) seg[i] = -INF;
  Set(1, 1, 2, R[1], 1, n + 3);
  double ans = 1000000000.0;
  for (long long i = 2; i <= n + 2; i++) {
    long long x = a[suf[i]] - 2 * D[i];
    if (x < a[i]) {
      x = max(x, -INF + 1);
      long long koj = BS(1, 1, n + 3, x);
      ans = min(ans, (a[i] - a[koj]) * 1.0 / 2.0);
    }
    Set(1, i, i + 1, R[i], 1, n + 3);
  }
  for (long long i = 2; i < n + 2; i++) {
    long long r = a[suf[i]], l = a[pre[i]];
    ans = min(ans, (r - l) * 1.0 / 2.0);
  }
  cout << fixed << setprecision(4) << ans;
  return 0;
}
