#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:128000000")
using namespace std;
void solve();
void precalc();
clock_t start;
bool doing = true;
int main() {
  int t = 1;
  cout.sync_with_stdio(0);
  cin.tie(0);
  precalc();
  cout.precision(10);
  cout << fixed;
  start = clock();
  int testNum = 1;
  while (t--) {
    solve();
  }
  return 0;
}
void precalc() {}
int binpow(int q, int w, int mod) {
  if (!w) return 1;
  if (w & 1) return q * binpow(q, w - 1, mod) % mod;
  return binpow(q * q % mod, w / 2, mod);
}
int gcd(int q, int w) {
  while (w) {
    q %= w;
    swap(q, w);
  }
  return q;
}
const long long INF = 100100000000;
struct treap {
  typedef struct _node {
    long long key;
    long long prior;
    long long cnt;
    _node* l;
    _node* r;
    long long val;
    long long mx;
    _node(long long key, long long val) : key(key), val(val), mx(mx) {
      prior = (rand() << 16) | rand();
      l = 0;
      r = 0;
      cnt = 1;
    }
    void recalc() {
      mx = val;
      if (l) {
        mx = max(mx, l->mx);
      }
      if (r) {
        mx = max(mx, r->mx);
      }
      cnt = 1 + Cnt(l) + Cnt(r);
    }
  } * node;
  static long long Cnt(node v) {
    if (!v) return 0;
    return v->cnt;
  }
  node root;
  size_t Size;
  node merge(node l, node r) {
    if (!l) return r;
    if (!r) return l;
    if (l->prior < r->prior) {
      l->r = merge(l->r, r);
      l->recalc();
      return l;
    } else {
      r->l = merge(l, r->l);
      r->recalc();
      return r;
    }
  }
  void split(node v, long long key, node& l, node& r) {
    l = r = 0;
    if (!v) return;
    if (v->key < key) {
      l = v;
      split(l->r, key, l->r, r);
      l->recalc();
    } else {
      r = v;
      split(r->l, key, l, r->l);
      r->recalc();
    }
  }
  treap() { root = 0; }
  void insert(long long key, long long val) {
    node l, r;
    split(root, key, l, r);
    root = merge(l, merge(new _node(key, val), r));
  }
  long long getVal(long long key) {
    node l, r;
    split(root, key, l, r);
    long long res = Cnt(r);
    root = merge(l, r);
    return res;
  }
  long long getMax(long long L) {
    node l, r;
    split(root, L, l, r);
    long long res = r ? r->mx : -INF;
    root = merge(l, r);
    return res;
  }
};
void solve() {
  long long n;
  cin >> n;
  n += 2;
  vector<long long> x(n), d(n);
  for (long long i = 0; i < n; ++i) {
    cin >> x[i];
  }
  for (long long i = 1; i + 1 < n; ++i) {
    cin >> d[i];
  }
  d[0] = d[n - 1] = INF;
  long long len = x[n - 1];
  vector<long long> borders[2];
  for (long long w = 0; w < 2; ++w) {
    treap dps;
    dps.insert(0, INF);
    vector<long long> rightBorder(n);
    rightBorder[0] = INF;
    for (long long i = 1; i < n; ++i) {
      long long l = 0;
      long long r = i;
      while (l + 1 < r) {
        long long m = (l + r) / 2;
        if (dps.getMax(x[m]) >= x[i]) {
          l = m;
        } else {
          r = m;
        }
      }
      rightBorder[i] = 2 * d[i] - (x[i] - x[l]) + x[i];
      if (rightBorder[i] <= x[i]) {
        rightBorder[i] = -INF;
      } else {
        dps.insert(x[i], rightBorder[i]);
      }
    }
    reverse(d.begin(), d.end());
    reverse(x.begin(), x.end());
    for (long long i = 0; i < n; ++i) {
      x[i] = len - x[i];
    }
    if (w) {
      reverse(rightBorder.begin(), rightBorder.end());
      for (long long i = 0; i < n; ++i) {
        rightBorder[i] = len - rightBorder[i];
      }
    }
    borders[w] = rightBorder;
  }
  long long ans = INF;
  treap dp;
  for (long long i = 0; i < n; ++i) {
    if (i > 0 && borders[1][i] <= x[i]) {
      long long l = 0;
      long long r = i;
      while (l + 1 < r) {
        long long m = (l + r) / 2;
        if (dp.getMax(x[m]) >= borders[1][i]) {
          l = m;
        } else {
          r = m;
        }
      }
      if (x[l] >= borders[1][i] && x[i] <= borders[0][l] &&
          (i != n - 1 || l != 0)) {
        ans = 0;
      } else {
        if (borders[1][i] <= borders[0][l]) {
          ans = min(ans, x[i] - x[l]);
        }
      }
    }
    if (borders[0][i] >= x[i]) {
      dp.insert(x[i], borders[0][i]);
    }
  }
  double res = ans / 2.0;
  cout << res << "\n";
}
