#include <bits/stdc++.h>
template <typename T>
bool ckmax(T &x, T y) {
  return x < y ? x = y, true : false;
}
template <typename T>
bool ckmin(T &x, T y) {
  return x > y ? x = y, true : false;
}
using namespace std;
const long long inf = 1000000000;
const double Pi = acos(-1);
const long long mod = 1e9 + 81;
const double eps = 1e-6;
inline long long fpow(long long a, long long b = mod - 2, long long p = mod) {
  a %= p;
  long long res = 1;
  while (b) {
    if (b & 1) res = 1ll * res * a % p;
    a = 1ll * a * a % p;
    b >>= 1;
  }
  return res;
}
inline long long read() {
  char c = getchar();
  long long x = 0;
  bool f = 0;
  for (; !isdigit(c); c = getchar()) f ^= !(c ^ 45);
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
  if (f) x = -x;
  return x;
}
inline void write(long long x) {
  if (x < 0) {
    putchar('-');
    write(-x);
    return;
  }
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline void writesp(long long x) { write(x), putchar(' '); }
inline void writeln(long long x) {
  write(x);
  putchar('\n');
}
long long n;
long long x[111111], d[111111];
long long stk[111111], top;
long long L[111111], R[111111];
inline long long check(long long r, long long v) {
  long long l = 0;
  while (r - l >= 10) {
    long long mid = (l + r) >> 1;
    if (2 * d[stk[mid]] + L[stk[mid]] >= v)
      l = mid + 1;
    else
      r = mid - 1;
  }
  for (long long i = (r), iE = (l); i >= iE; i--)
    if (2 * d[stk[i]] + L[stk[i]] >= v) return i;
}
signed main() {
  n = read();
  for (long long i = (0), iE = (n + 1); i <= iE; i++) x[i] = read();
  for (long long i = (1), iE = (n); i <= iE; i++) d[i] = read();
  d[0] = d[n + 1] = inf;
  for (long long i = (1), iE = (n + 1); i <= iE; i++) {
    while (top && 2 * d[stk[top]] + L[stk[top]] < x[i]) --top;
    L[i] = x[stk[top]];
    stk[++top] = i;
  }
  if (top > 1) return puts("0") & 0;
  stk[top = 0] = n + 1;
  for (long long i = (n), iE = (1); i >= iE; i--) {
    while (top && R[stk[top]] - 2 * d[stk[top]] > x[i]) --top;
    R[i] = x[stk[top]];
    stk[++top] = i;
  }
  stk[top = 0] = 0;
  long long ans = 1e10;
  for (long long i = (1), iE = (n + 1); i <= iE; i++) {
    if (x[i] > R[i] - 2 * d[i]) {
      long long j = check(top, R[i] - 2 * d[i]);
      assert(i >= stk[j]);
      ckmin(ans, x[i] - x[stk[j]]);
    }
    if (x[i] >= 2 * d[i] + L[i]) continue;
    while (top && 2 * d[i] + L[i] >= 2 * d[stk[top]] + L[stk[top]]) --top;
    stk[++top] = i;
  }
  printf("%.12lf\n", ans / 2.0);
}
