Problem: We have an old building with n + 2 columns in a row. These columns support the ceiling. These columns are located in points with coordinates 0 = x0 < x1 < ... < xn < xn + 1. The leftmost and the rightmost columns are special, we will call them bearing, the other columns are ordinary. 

For each column we know its durability di. Let's consider an ordinary column with coordinate x. Let's assume that the coordinate of the closest to it column to the left (bearing or ordinary) is a and the coordinate of the closest to it column to the right (also, bearing or ordinary) is b. In this task let's assume that this column supports the segment of the ceiling from point <image> to point <image> (here both fractions are considered as real division). If the length of the segment of the ceiling supported by the column exceeds di, then the column cannot support it and it crashes after a while, and after that the load is being redistributeed between the neighbouring columns according to the same principle.

<image>

Thus, ordinary columns will be crashing for some time until the process stops at some state. One can prove that the set of the remaining columns doesn't depend on the order in which columns crash. If there are only two bearing columns left in the end, then we assume that the whole construction crashes under the weight of the roof. But if at least one ordinary column stays in addition to the bearing ones, then the building doesn't crash.

To make the building stronger, we can add one extra ordinary column of arbitrary durability d' at any (not necessarily integer) point 0 < x' < xn + 1. If point x' is already occupied by an ordinary column, it is replaced by a new one.

Your task is to find out: what minimal durability can the added column have so that the building doesn't crash?

Input

The first line contains integer n (1 ≤ n ≤ 105) — the number of ordinary columns.

The second line contains n + 2 integers x0, x1, ..., xn, xn + 1 (x0 = 0, xi < xi + 1 for 0 ≤ i ≤ n, xn + 1 ≤ 109) — the coordinates of the columns.

The third line contains n integers d1, d2, ..., dn (1 ≤ di ≤ 109).

Output

Print a single number — the minimum possible durability of the column that you need to add in order to make the building stay. If you do not have to add the column, please print 0. Your answer will be checked with the relative or absolute error 10 - 4.

Examples

Input

2
0 20 40 100
15 40


Output

10


Input

3
0 4 10 28 30
9 13 5


Output

0

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <class T>
void debug(T a, T b) {
  ;
}
template <class T>
void chmin(T& a, const T& b) {
  if (a > b) a = b;
}
template <class T>
void chmax(T& a, const T& b) {
  if (a < b) a = b;
}
namespace std {
template <class S, class T>
ostream& operator<<(ostream& out, const pair<S, T>& a) {
  out << '(' << a.first << ',' << a.second << ')';
  return out;
}
}  // namespace std
long long int readL() {
  long long int res;
  scanf("%I64d", &res);
  return res;
}
void printL(long long int res) { printf("%I64d", res); }
const long long int INF = 1e18;
int n;
long long int pos[100005];
long long int stre[100005];
pair<long long int, long long int> range1[400005], range2[400005];
int m1, m2;
void solve(pair<long long int, long long int>* range, int& m) {
  range[m++] = make_pair(0, 0);
  stack<int> stk;
  stk.push(0);
  long long int seek;
  for (int i = 1; i < n + 1; ++i) {
    stk.push(i);
    seek = pos[i] + 1;
    ;
    ;
    while (stk.size() > 1) {
      int p = stk.top(), last;
      stk.pop();
      last = stk.top();
      long long int lim = stre[p] - (pos[p] - pos[last]) + pos[p];
      ;
      ;
      ;
      ;
      ;
      ;
      ;
      ;
      ;
      ;
      ;
      ;
      if (lim < pos[i + 1]) {
        if (seek <= lim) range[m++] = make_pair(seek, pos[p]);
        seek = max(seek, lim + 1);
      } else {
        stk.push(p);
        break;
      }
    }
    if (seek <= pos[i + 1]) range[m++] = make_pair(seek, pos[stk.top()]);
  }
}
long long int L;
long long int solve2(pair<long long int, long long int>* range, int m,
                     long long int p) {
  p = L - p;
  int q = lower_bound(range, range + m, make_pair(p + 1, -1ll)) - range;
  --q;
  return (p - range[q].second);
}
int main() {
  cin >> n;
  for (int i = 0; i < (n + 2); ++i) pos[i] = readL();
  for (int i = 0; i < (n); ++i) stre[i + 1] = readL() * 2;
  stre[0] = stre[n + 1] = INF;
  solve(range1, m1);
  ;
  ;
  debug(range1, range1 + m1);
  if (range1[m1 - 1].second > 0) {
    puts("0");
    return 0;
  }
  L = pos[n + 1];
  reverse(pos, pos + n + 2);
  for (int i = 0; i < (n + 2); ++i) pos[i] = L - pos[i];
  reverse(stre, stre + n + 2);
  solve(range2, m2);
  debug(range2, range2 + m2);
  long long int res = INF;
  for (int i = 0; i < (m1); ++i) {
    if (i)
      chmin(res, solve2(range2, m2, range1[i].first) + range1[i].first -
                     range1[i].second);
    if (i + 1 < m1)
      chmin(res, solve2(range2, m2, range1[i + 1].first - 1) +
                     range1[i + 1].first - 1 - range1[i].second);
    ;
    ;
  }
  for (int i = 0; i < (m2); ++i) {
    if (i)
      chmin(res, solve2(range1, m1, range2[i].first) + range2[i].first -
                     range2[i].second);
    if (i + 1 < m2)
      chmin(res, solve2(range1, m1, range2[i + 1].first - 1) +
                     range2[i + 1].first - 1 - range2[i].second);
    ;
    ;
  }
  printf("%f\n", (double)res / 2);
  return 0;
}