#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 5;
int x[N], d[N], S[N], top;
int far[2][N];
stack<int> stacks[2];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i <= n + 1; i++) {
    scanf("%d", &x[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &d[i]);
    d[i] <<= 1;
  }
  top = 0;
  S[top++] = 0;
  far[0][0] = 1e9;
  for (int i = 1; i <= n; i++) {
    while (top && far[0][S[top - 1]] + x[S[top - 1]] < x[i]) {
      top--;
    }
    far[0][i] = max(0, d[i] - (x[i] - x[S[top - 1]]));
    while (top && far[0][S[top - 1]] + x[S[top - 1]] <= far[0][i] + x[i]) {
      top--;
    }
    S[top++] = i;
  }
  far[1][n + 1] = 1e9;
  top = 0;
  S[top++] = n + 1;
  for (int i = n; i; i--) {
    while (top && x[S[top - 1]] - far[1][S[top - 1]] > x[i]) {
      top--;
    }
    far[1][i] = max(0, d[i] - (x[S[top - 1]] - x[i]));
    while (top && x[S[top - 1]] - far[1][S[top - 1]] >= x[i] - far[1][i]) {
      top--;
    }
    S[top++] = i;
  }
  bool no = false;
  for (int i = 1; i <= n; i++) {
    if (far[0][i] + x[i] >= x[n + 1]) {
      no = true;
    }
    if (x[i] - far[1][i] <= x[0]) {
      no = true;
    }
  }
  if (no) {
    puts("0");
  } else {
    double res = 1e9;
    vector<pair<int, int>> vec;
    vec.emplace_back(x[0] + far[0][0], 0);
    for (int i = 1; i <= n + 1; i++) {
      if (far[1][i] > 0) {
        int l = 0, r = vec.size() - 1;
        while (l < r) {
          int mid = l + r + 1 >> 1;
          if (vec[mid].first >= x[i] - far[1][i]) {
            l = mid;
          } else {
            r = mid - 1;
          }
        }
        res = min(x[i] - x[vec[l].second] + 0., res);
      }
      if (far[0][i] > 0) {
        while (vec.back().first <= x[i] + far[0][i]) {
          vec.pop_back();
        }
        vec.emplace_back(x[i] + far[0][i], i);
      }
    }
    res /= 2;
    printf("%.1f\n", res);
  }
  return 0;
}
