#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
const int inf = 1e9;
stack<pair<int, int> > stk;
int f[N], g[N], x[N], d[N], n;
int st[N], tp, id[N];
int main() {
  scanf("%d", &n);
  for (int i = 0; i <= n + 1; i++) scanf("%d", &x[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &d[i]);
  d[0] = d[n + 1] = inf;
  stk.push(make_pair(x[0], inf));
  for (int i = 1; i <= n; i++) {
    while (x[i] > stk.top().first + stk.top().second) stk.pop();
    f[i] = x[i] - stk.top().first;
    stk.push(make_pair(x[i], 2 * d[i] - f[i]));
  }
  while (!stk.empty()) stk.pop();
  stk.push(make_pair(x[n + 1], inf));
  for (int i = n; i >= 1; i--) {
    while (x[i] < stk.top().first - stk.top().second) stk.pop();
    g[i] = stk.top().first - x[i];
    stk.push(make_pair(x[i], 2 * d[i] - g[i]));
  }
  for (int i = 1; i <= n; i++)
    if (2 * d[i] >= f[i] + g[i]) puts("0"), exit(0);
  double ans = 2e9;
  for (int i = 1; i <= n; i++) ans = min(ans, 1.0 * (f[i] + g[i]) / 2);
  st[++tp] = x[n + 1] + g[n + 1] - 2 * d[n + 1], id[tp] = n + 1;
  for (int i = n; i >= 0; i--) {
    if (2 * d[i] > f[i]) {
      int p =
          upper_bound(st + 1, st + tp + 1, 2ll * d[i] - f[i] + x[i]) - st - 1;
      ans = min(ans, 1.0 * (x[id[p]] - x[i]) / 2);
    }
    if (2 * d[i] > g[i]) {
      int val = x[i] + g[i] - 2 * d[i];
      while (tp && st[tp] > val) tp--;
      st[++tp] = val, id[tp] = i;
    }
  }
  printf("%.7lf\n", ans);
  return 0;
}
