#include <bits/stdc++.h>
using namespace std;
namespace IO {
template <class T>
inline void read(T &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch <= '9' && ch >= '0') x = x * 10 + ch - '0', ch = getchar();
  x *= f;
}
};  // namespace IO
using namespace IO;
const int N = 200005;
const long long INF = 1e18;
long long f[N], g[N];
int S[N], top;
int find(long long x) {
  int L = 1, R = top;
  while (L < R) {
    int mid = (L + R + 1) >> 1;
    if (f[S[mid]] >= x)
      L = mid;
    else
      R = mid - 1;
  }
  return L;
}
int n, l[N], r[N];
long long x[N], d[N];
int main() {
  read(n);
  for (int i = (0); i <= (n + 1); ++i) read(x[i]);
  for (int i = (1); i <= (n); ++i) read(d[i]);
  d[0] = d[n + 1] = INF;
  stack<int> s;
  s.push(0);
  f[0] = INF;
  for (int i = (1); i <= (n + 1); ++i) {
    while (f[s.top()] < x[i]) s.pop();
    l[i] = s.top(), f[i] = x[l[i]] + 2 * d[i];
    s.push(i);
  }
  while (!s.empty()) s.pop();
  s.push(n + 1);
  g[n + 1] = -INF;
  for (int i = (n); i >= (0); --i) {
    while (g[s.top()] > x[i]) s.pop();
    r[i] = s.top(), g[i] = x[r[i]] - 2 * d[i];
    s.push(i);
  }
  while (!s.empty()) s.pop();
  if (l[n + 1] != 0) {
    cout << 0;
    return 0;
  }
  long long ans = INF;
  S[++top] = 0;
  for (int i = (1); i <= (n + 1); ++i) {
    if (x[r[i]] - 2 * d[i] < x[i]) {
      int j = find(x[r[i]] - 2 * d[i]);
      ans = min(ans, x[i] - x[S[j]]);
    }
    if (x[i] >= x[l[i]] + 2 * d[i]) continue;
    while (top && f[i] >= f[S[top]]) top--;
    S[++top] = i;
  }
  cout << ans / 2.0;
  return 0;
}
