#include <bits/stdc++.h>
using namespace std;
int N;
long long X;
long long x[100010], r[100010], l[100010];
long long d[100010];
bool broken[100010];
int sz;
int id[100010];
long long func(void) {
  int i, j;
  r[0] = l[N] = X;
  for (i = 1; i < N; i++) {
    if (x[i] + r[i] >= X) return 0;
    if (x[i] - l[i] <= 0) return 0;
  }
  long long ans = (1ll << 60);
  sz = 0;
  for (j = 1; j <= N; j++) {
    i = j - 1;
    if (r[i] != 0) {
      while (1) {
        if (sz == 0) break;
        int p = id[sz - 1];
        if (x[p] + r[p] > x[i] + r[i]) break;
        sz--;
      }
      id[sz] = i;
      sz++;
    }
    if (l[j] != 0) {
      int low = 0, high = sz;
      while (high - low > 1) {
        int mid = (low + high) / 2;
        int p = id[mid];
        if (x[p] + r[p] >= x[j] - l[j])
          low = mid;
        else
          high = mid;
      }
      int q = id[low];
      ans = min(ans, x[j] - x[q]);
    }
  }
  return ans;
}
int st[100010];
void calc_r(void) {
  int i;
  sz = 1;
  st[0] = 0;
  for (i = 1; i < N; i++) {
    while (1) {
      if (sz < 2) break;
      int p = st[sz - 2], q = st[sz - 1];
      if (2 * d[q] >= x[i] - x[p]) break;
      sz--;
    }
    r[i] = 2 * d[i] - (x[i] - x[st[sz - 1]]);
    if (r[i] <= 0) r[i] = 0;
    st[sz] = i;
    sz++;
  }
}
void calc_l(void) {
  int i;
  sz = 1;
  st[0] = N;
  for (i = N - 1; i >= 1; i--) {
    while (1) {
      if (sz < 2) break;
      int p = st[sz - 2], q = st[sz - 1];
      if (2 * d[q] >= x[p] - x[i]) break;
      sz--;
    }
    l[i] = 2 * d[i] - (x[st[sz - 1]] - x[i]);
    if (l[i] <= 0) l[i] = 0;
    st[sz] = i;
    sz++;
  }
}
int main(void) {
  int i;
  cin >> N;
  for ((i) = 0; (i) < (int)(N + 2); (i)++) {
    int tmp;
    scanf("%d", &tmp);
    x[i] = tmp;
  }
  for (i = 1; i <= N; i++) {
    int tmp;
    scanf("%d", &tmp);
    d[i] = tmp;
  }
  N++;
  X = x[N];
  calc_r();
  calc_l();
  long long ans = func();
  printf("%.9f\n", ans / 2.0);
  return 0;
}
