#include <bits/stdc++.h>
using namespace std;
const int N = 800100;
const long long inf = (long long)1000000000 * (long long)1000000000;
struct nd {
  long long l, r, p;
} a[N], b[N];
long long pos[N], d[N], c[N];
int s[N], acnt = 0, bcnt = 0, cnt, top, n;
void get(nd a[]) {
  int i;
  long long nw;
  c[1] = c[n + 2] = inf;
  top = 0;
  cnt = 1;
  a[1].l = 1;
  a[1].r = (long long)2 * (long long)pos[2];
  a[1].p = 0;
  s[++top] = 1;
  nw = (long long)2 * (long long)pos[2] + 1;
  for (i = 2; i <= n + 1; i++) {
    s[++top] = i;
    c[i] = d[i] - (pos[i] - pos[s[top - 1]]);
    while (c[s[top - 1]] + pos[s[top - 1]] <= c[s[top]] + pos[s[top]])
      s[top - 1] = s[top--];
    while (c[s[top]] + pos[s[top]] <= pos[i]) top--;
    while (c[s[top]] + pos[s[top]] < pos[i + 1]) {
      a[++cnt].l = nw;
      nw = (long long)2 * (c[s[top]] + pos[s[top]]);
      a[cnt].r = nw;
      nw++;
      a[cnt].p = pos[s[top]];
      top--;
    }
    a[++cnt].l = nw;
    a[cnt].r = (long long)2 * pos[i + 1];
    a[cnt].p = pos[s[top]];
    nw = (long long)2 * pos[i + 1] + 1;
  }
  if (top > 1) {
    printf("0\n");
    exit(0);
  }
}
int main() {
  int i, j, k, x, p;
  long long ans;
  scanf("%d", &n);
  for (i = 1; i <= n + 2; i++) {
    scanf("%d", &x);
    pos[i] = x;
  }
  for (i = 1; i <= n; i++) {
    scanf("%d", &x);
    d[i + 1] = (long long)2 * (long long)x;
  }
  get(a);
  acnt = cnt;
  for (i = 1; i <= n + 2; i++) pos[i] = pos[n + 2] - pos[i];
  reverse(pos + 1, pos + n + 3);
  reverse(d + 1, d + n + 3);
  get(b);
  bcnt = cnt;
  for (i = 1; i <= n + 2; i++) pos[i] = pos[n + 2] - pos[i];
  reverse(pos + 1, pos + n + 3);
  reverse(d + 1, d + n + 3);
  for (i = 1; i <= bcnt; i++) {
    b[i].p = pos[n + 2] - b[i].p;
    b[i].l = (long long)2 * pos[n + 2] - b[i].l;
    b[i].r = (long long)2 * pos[n + 2] - b[i].r;
    swap(b[i].l, b[i].r);
  }
  reverse(b + 1, b + bcnt + 1);
  p = 1;
  ans = inf;
  for (i = 1; i <= acnt; i++) {
    while ((p <= bcnt) && (b[p].r <= a[i].r))
      ans = min(ans, b[p].p - a[i].p), p++;
    if ((p <= bcnt) && (b[p].l <= a[i].r)) ans = min(ans, b[p].p - a[i].p);
  }
  double out = (double)ans / 2.0;
  printf("%.6f\n", out);
  return 0;
}
