#include <bits/stdc++.h>
using namespace std;
const long long INF = 2000000000005LL;
long long n, m;
long long a[100005], d[100005];
set<long long> s1;
multiset<pair<long long, long long> > s2;
long long now[100005];
long long node[2][2000505];
vector<pair<long long, long long> > to_update[2];
long long c[400505], of[400505];
map<long long, long long> sign;
pair<long long, long long> pillar[400505];
double res = (double)INF;
bool check() {
  for (long long i = 0; i <= n + 1; i++) s1.insert(i);
  for (long long i = 1; i <= n; i++) {
    s2.insert(pair<long long, long long>(d[i] - (a[i + 1] - a[i - 1]) / 2, i));
    now[i] = d[i] - (a[i + 1] - a[i - 1]) / 2;
  }
  while (!s2.empty()) {
    multiset<pair<long long, long long> >::iterator it = s2.begin();
    long long first = (*it).first, i = (*it).second;
    if (first >= 0) break;
    set<long long>::iterator it1 = s1.find(i), it2 = s1.upper_bound(i);
    --it1;
    long long second = (*it1), z = (*it2);
    s1.erase(i);
    s2.erase(it);
    if (second != 0) {
      it = s2.find(pair<long long, long long>(now[second], second));
      s2.erase(it);
      now[second] -= (a[z] - a[i]) / 2;
      s2.insert(pair<long long, long long>(now[second], second));
    }
    if (z != n + 1) {
      it = s2.find(pair<long long, long long>(now[z], z));
      s2.erase(it);
      now[z] -= (a[i] - a[second]) / 2;
      s2.insert(pair<long long, long long>(now[z], z));
    }
  }
  if (s2.empty()) return false;
  return true;
}
long long upper(long long first) {
  long long l = 0, r = n + 2, mid;
  while (l < r) {
    mid = (l + r) / 2;
    if (a[mid] <= first)
      l = mid + 1;
    else
      r = mid;
  }
  return (l - 1);
}
long long lower(long long first) {
  long long l = 0, r = n + 1, mid;
  while (l < r) {
    mid = (l + r + 1) / 2;
    if (a[mid] > first)
      r = mid - 1;
    else
      l = mid;
  }
  if (a[l] == first)
    return l;
  else
    return (l + 1);
}
void update(long long type, long long k, long long p, long long q,
            long long first, long long second, long long z) {
  if (p > q || p > second || first > q) return;
  if (first <= p && q <= second) {
    node[type][k] = z;
    return;
  }
  if (node[type][k] != -1) {
    node[type][2 * k] = node[type][k];
    node[type][2 * k + 1] = node[type][k];
    node[type][k] = -1;
  }
  update(type, 2 * k, p, (p + q) / 2, first, second, z);
  update(type, 2 * k + 1, (p + q) / 2 + 1, q, first, second, z);
}
long long get(long long type, long long k, long long p, long long q,
              long long first) {
  if (p > q || p > first || q < first) return -1;
  if (p == first && first == q) return node[type][k];
  if (node[type][k] != -1) {
    node[type][2 * k] = node[type][k];
    node[type][2 * k + 1] = node[type][k];
    node[type][k] = -1;
  }
  return max(get(type, 2 * k, p, (p + q) / 2, first),
             get(type, 2 * k + 1, (p + q) / 2 + 1, q, first));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (long long i = 0; i <= n + 1; i++) {
    cin >> a[i];
    a[i] *= 2;
  }
  for (long long i = 1; i <= n; i++) {
    cin >> d[i];
    d[i] *= 2;
  }
  if (check()) {
    cout << 0 << endl;
    return 0;
  }
  a[n + 2] = INF;
  c[0] = 2;
  c[1] = a[0];
  c[2] = a[n + 1];
  for (long long i = 1; i <= n + 1; i++) {
    long long first = get(0, 1, 0, n + 1, i);
    if (d[i] * 2 >= a[i] - a[first]) {
      long long second = upper(a[i] + (2 * d[i] - (a[i] - a[first])));
      update(0, 1, 0, n + 1, i, second, i);
      to_update[0].push_back(pair<long long, long long>(
          a[i], min(a[i] + (2 * d[i] - (a[i] - a[first])), a[n + 1])));
      c[0]++;
      c[c[0]] = a[i];
      c[0]++;
      c[c[0]] = min(a[i] + (2 * d[i] - (a[i] - a[first])), a[n + 1]);
    }
  }
  for (long long i = 1; i <= 5 * (n + 2); i++) node[1][i] = n + 1;
  for (long long i = n; i >= 0; i--) {
    long long first = get(1, 1, 0, n + 1, i);
    if (d[i] * 2 >= a[first] - a[i]) {
      long long second =
          lower(max(a[0], a[i] - (2 * d[i] - (a[first] - a[i]))));
      update(1, 1, 0, n + 1, second, i, i);
      to_update[1].push_back(pair<long long, long long>(
          max(a[0], a[i] - (2 * d[i] - (a[first] - a[i]))), a[i]));
      c[0]++;
      c[c[0]] = a[i];
      c[0]++;
      c[c[0]] = max(a[0], a[i] - (2 * d[i] - (a[first] - a[i])));
    }
  }
  sort(c + 1, c + 1 + c[0]);
  m = 1;
  sign[c[1]] = 1;
  of[1] = c[1];
  for (long long i = 2; i <= c[0]; i++) {
    if (c[i] != c[i - 1]) m++;
    sign[c[i]] = m;
    of[m] = c[i];
  }
  for (long long i = 1; i <= 5 * m; i++) {
    node[0][i] = 1;
    node[1][i] = m;
  }
  for (long long i = 2; i < m; i++)
    pillar[i] = pair<long long, long long>(-1, -1);
  for (long long i = 0; i <= 1; i++) {
    for (long long j = 0; j < (long long)to_update[i].size(); j++) {
      long long first = sign[to_update[i][j].first],
                second = sign[to_update[i][j].second],
                z = (i == 0) ? first : second;
      if (i == 0)
        pillar[z].first = get(0, 1, 1, m, z);
      else
        pillar[z].second = get(1, 1, 1, m, z);
      update(i, 1, 1, m, first, second, z);
    }
  }
  for (long long i = 2; i < m; i++) {
    if (pillar[i].first == -1) pillar[i].first = get(0, 1, 1, m, i);
    if (pillar[i].second == -1) pillar[i].second = get(1, 1, 1, m, i);
  }
  for (long long i = 2; i < m; i++) {
    long long first = pillar[i].first, second = pillar[i].second;
    res = min(res, (double)(of[second] - of[first]) / 4.0);
  }
  cout.precision(9);
  cout << fixed << res << endl;
  return 0;
}
