#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const double oo = 1e9;
const double eps = 1e-9;
const int LN = 20;
int l[N], r[N], st[N];
double x[N], d[N], dp[N][LN];
bool good(int i, int p, int j) { return d[p] - (x[j] - x[i]) / 2 > -eps; }
int main() {
  int i, j, u, n, p, zn;
  double xl, xr, X, L, R;
  bool fl;
  pair<double, int> pr;
  scanf("%d", &n);
  for (i = 0; i <= n + 1; ++i) scanf("%lf", &x[i]);
  for (i = 1; i <= n; ++i) scanf("%lf", &d[i]);
  d[0] = d[n + 1] = oo;
  r[n + 1] = n + 1;
  for (i = n; i >= 0; --i) {
    p = i + 1;
    while ((p != r[p]) && !good(i, p, r[p])) p = r[p];
    r[i] = p;
  }
  l[0] = 0;
  for (i = 1; i <= n + 1; ++i) {
    p = i - 1;
    while ((p != l[p]) && !good(l[p], p, i)) p = l[p];
    l[i] = p;
  }
  if (r[0] != n + 1) {
    printf("0\n");
    return 0;
  }
  for (i = 0; i <= n + 1; ++i) {
    p = r[i];
    if (d[i] - (x[p] - x[i]) / 2 < eps)
      dp[i][0] = oo;
    else
      dp[i][0] = x[p] - 2 * d[i];
  }
  dp[n + 1][0] = 0;
  for (u = 1; u < LN; ++u)
    for (i = 0; i <= n + 1; ++i) {
      j = min(n + 1, i + (1 << (u - 1)));
      dp[i][u] = min(dp[i][u - 1], dp[j][u - 1]);
    }
  st[1] = 0;
  for (i = 2; i < N; ++i) {
    st[i] = st[i - 1];
    if ((1 << (st[i] + 1)) <= i) ++st[i];
  }
  L = 0;
  R = oo;
  for (int it = 0; it <= 100; ++it) {
    X = (L + R) / 2;
    fl = false;
    for (i = j = 0; (i <= n) && !fl; ++i) {
      p = l[i];
      if (d[i] - (x[i] - x[p]) / 2 < eps) continue;
      for (; (j <= n + 1) && (X - (x[j] - x[i]) / 2 > -eps); ++j)
        ;
      xr = 2 * d[i] + x[p];
      if (i + 1 == j) continue;
      zn = st[j - i - 1];
      xl = min(dp[i + 1][zn], dp[j - (1 << zn)][zn]);
      if (abs(xl - oo) < eps) continue;
      if (xr - xl > -eps) fl = true;
    }
    if (fl)
      R = X;
    else
      L = X;
  }
  X = (L + R) / 2;
  printf("%.5lf\n", X);
  return 0;
}
