#include <bits/stdc++.h>
using namespace std;
int n, tp, trtot, rt[100009], a[100009], q[100009], ls[5000009], rs[5000009],
    mx[5000009];
long long f[100009], g[100009], b[100009];
void ins(int &k, int p, int l, int r, int x, int y) {
  k = ++trtot;
  mx[k] = max(mx[p], y);
  if (l == r) return;
  int mid = l + r >> 1;
  if (x <= mid) {
    rs[k] = rs[p];
    ins(ls[k], ls[p], l, mid, x, y);
  } else {
    ls[k] = ls[p];
    ins(rs[k], rs[p], mid + 1, r, x, y);
  }
}
int qry(int k, int l, int r, int x) {
  if (!k) return -1000000000;
  if (x <= l) return mx[k];
  int mid = l + r >> 1, ans = qry(rs[k], mid + 1, r, x);
  if (x <= mid) ans = max(ans, qry(ls[k], l, mid, x));
  return ans;
}
int main() {
  scanf("%d", &n);
  int i;
  for (i = 0; i <= n + 1; i++) scanf("%d", &a[i]);
  b[0] = b[n + 1] = 10000000000000000ll;
  for (i = 1; i <= n; i++) {
    scanf("%lld", &b[i]);
    b[i] <<= 1;
  }
  q[tp = 1] = 0;
  mx[0] = -1000000000;
  ins(rt[0], rt[0], 0, 1000000000, 1000000000, a[0]);
  for (i = 1; i <= n + 1; i++) {
    for (; tp > 1 && b[q[tp]] < a[i] - a[q[tp - 1]]; tp--)
      ;
    g[i] = b[i] - (a[i] - a[q[tp]]);
    if (g[i] > 0) {
      g[i] = min((long long)1000000000, g[i] + a[i]);
      ins(rt[i], rt[i - 1], 0, 1000000000, g[i], a[i]);
    } else
      rt[i] = rt[i - 1];
    q[++tp] = i;
  }
  if (q[tp - 1]) {
    puts("0");
    return 0;
  }
  q[tp = 1] = n + 1;
  int ans = a[n + 1] - mx[rt[n]];
  for (i = n; i; i--) {
    for (; tp > 1 && b[q[tp]] < a[q[tp - 1]] - a[i]; tp--)
      ;
    g[i] = b[i] - (a[q[tp]] - a[i]);
    if (g[i] > 0) {
      g[i] = max(0ll, a[i] - g[i]);
      ans = min(ans, a[i] - qry(rt[i - 1], 0, 1000000000, g[i]));
    }
    q[++tp] = i;
  }
  printf("%.10f\n", ans / 2.);
  return 0;
}
