#include <bits/stdc++.h>
using namespace std;
long long x[100000 + 5], d[100000 + 5];
int s[100000 + 5], top, f[100000 + 5];
long long v0[100000 + 5], v1[100000 + 5];
int main() {
  int n, i, j;
  double ans = 1e11;
  scanf("%d", &n);
  for (i = 0; i <= n + 1; i++) scanf("%lld", &x[i]);
  for (i = 1; i <= n; i++) scanf("%lld", &d[i]);
  s[++top] = 0;
  for (i = 1; i <= n; i++) {
    while (top > 1 && x[i] - x[f[s[top]]] > 2 * d[s[top]]) top--;
    v0[i] = 2 * d[i] - (x[i] - x[s[top]]);
    f[i] = s[top];
    while (top > 1 && d[i] * 2 + x[f[i]] >= d[s[top]] * 2 + x[f[s[top]]]) top--;
    s[++top] = i;
  }
  top = 0;
  s[++top] = n + 1;
  memset(f, 0, sizeof(f));
  for (i = n; i >= 1; i--) {
    while (top > 1 && x[f[s[top]]] - x[i] > 2 * d[s[top]]) top--;
    v1[i] = 2 * d[i] - (x[s[top]] - x[i]);
    f[i] = s[top];
    while (top > 1 && d[i] * 2 - x[f[i]] >= d[s[top]] * 2 - x[f[s[top]]]) top--;
    s[++top] = i;
  }
  for (i = 1; i <= n; i++)
    if (v0[i] >= 0 && v1[i] >= 0 && v0[i] + v1[i] - 2 * d[i] >= 0) {
      printf("0\n");
      return 0;
    }
  v0[0] = v1[n + 1] = 1e10;
  top = 0;
  s[++top] = 0;
  for (i = 1; i <= n + 1; i++) {
    int l = 1, r = top, id = 1;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (v0[s[mid]] + x[s[mid]] >= x[i] - v1[i])
        l = mid + 1, id = mid;
      else
        r = mid - 1;
    }
    if (v1[i] > 0) {
      ans = min(ans, (x[i] - x[s[id]]) / 2.0);
    }
    if (v0[i] > 0) {
      while (top > 0 && v0[i] + x[i] >= v0[s[top]] + x[s[top]]) top--;
      s[++top] = i;
    }
  }
  printf("%.4lf\n", ans);
}
