#include <bits/stdc++.h>
using namespace std;
int n, A[100005], D[100005], stk[100005], top;
int F[100005], G[100005], tre[100005], m;
vector<long long> V;
void Update(int x, int v) {
  x = lower_bound(V.begin(), V.end(), x) - V.begin() + 1;
  for (int i = x; i; i -= i & -i) tre[i] = max(tre[i], v);
}
int Getval(int x) {
  x = lower_bound(V.begin(), V.end(), x) - V.begin() + 1;
  int ret = -1;
  for (int i = x; i <= m; i += i & -i) ret = max(ret, tre[i]);
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i <= n + 1; i++) scanf("%d", &A[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &D[i]);
  stk[top = 0] = 0;
  for (int i = 1; i <= n; i++) {
    while (top && A[i] - A[F[stk[top]]] > 2ll * D[stk[top]]) top--;
    F[i] = stk[top];
    while (top && 2ll * D[stk[top]] + A[F[stk[top]]] <= 2ll * D[i] + A[F[i]])
      top--;
    stk[++top] = i;
  }
  stk[top = 0] = n + 1;
  for (int i = n; i >= 1; i--) {
    while (top && A[G[stk[top]]] - A[i] > 2ll * D[stk[top]]) top--;
    G[i] = stk[top];
    while (top && A[G[stk[top]]] - 2ll * D[stk[top]] >= A[G[i]] - 2ll * D[i])
      top--;
    stk[++top] = i;
  }
  for (int i = 1; i <= n; i++)
    if (A[G[i]] - A[F[i]] <= 2ll * D[i]) {
      puts("0");
      return 0;
    }
  for (int i = 1; i <= n; i++) {
    if (A[i] - A[F[i]] < 2ll * D[i]) V.push_back(2ll * D[i] + A[F[i]]);
  }
  sort(V.begin(), V.end());
  m = unique(V.begin(), V.end()) - V.begin();
  V.resize(m);
  memset(tre, -1, sizeof(tre));
  int res = A[n + 1];
  for (int i = 1; i <= n; i++) res = min(res, A[G[i]] - A[F[i]]);
  for (int i = 1; i <= n; i++) {
    if (A[G[i]] - A[i] < 2ll * D[i]) {
      int tmp = Getval(A[G[i]] - 2ll * D[i]);
      if (tmp != -1) res = min(res, A[i] - tmp);
    }
    if (A[i] - A[F[i]] < 2ll * D[i]) Update(2ll * D[i] + A[F[i]], A[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (F[i] == 0 && A[G[i]] - A[i] < 2ll * D[i]) res = min(res, A[i]);
    if (G[i] == n + 1 && A[i] - A[F[i]] < 2ll * D[i])
      res = min(res, A[n + 1] - A[i]);
  }
  printf("%g", res * 0.5);
}
