Problem: You received as a gift a very clever robot walking on a rectangular board. Unfortunately, you understood that it is broken and behaves rather strangely (randomly). The board consists of N rows and M columns of cells. The robot is initially at some cell on the i-th row and the j-th column. Then at every step the robot could go to some another cell. The aim is to go to the bottommost (N-th) row. The robot can stay at it's current cell, move to the left, move to the right, or move to the cell below the current. If the robot is in the leftmost column it cannot move to the left, and if it is in the rightmost column it cannot move to the right. At every step all possible moves are equally probable. Return the expected number of step to reach the bottommost row.

Input

On the first line you will be given two space separated integers N and M (1 ≤ N, M ≤ 1000). On the second line you will be given another two space separated integers i and j (1 ≤ i ≤ N, 1 ≤ j ≤ M) — the number of the initial row and the number of the initial column. Note that, (1, 1) is the upper left corner of the board and (N, M) is the bottom right corner.

Output

Output the expected number of steps on a line of itself with at least 4 digits after the decimal point.

Examples

Input

10 10
10 4


Output

0.0000000000


Input

10 14
5 14


Output

18.0038068653

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <class T>
void pv(T a, T b) {
  for (T i = a; i != b; ++i) cout << *i << " ";
  cout << endl;
}
template <class T>
void pvp(T a, T b) {
  for (T i = a; i != b; ++i)
    cout << "(" << i->first << ", " << i->second << ") ";
  cout << endl;
}
void chmin(int &t, int f) {
  if (t > f) t = f;
}
void chmax(int &t, int f) {
  if (t < f) t = f;
}
void chmin(long long &t, long long f) {
  if (t > f) t = f;
}
void chmax(long long &t, long long f) {
  if (t < f) t = f;
}
void chmin(double &t, double f) {
  if (t > f) t = f;
}
void chmax(double &t, double f) {
  if (t < f) t = f;
}
int in_c() {
  int c;
  for (; (c = getchar()) <= ' ';) {
    if (!~c) throw ~0;
  }
  return c;
}
int in() {
  int x = 0, c;
  for (; (unsigned)((c = getchar()) - '0') >= 10;) {
    if (c == '-') return -in();
    if (!~c) throw ~0;
  }
  do {
    x = (x << 3) + (x << 1) + (c - '0');
  } while ((unsigned)((c = getchar()) - '0') < 10);
  return x;
}
long long In() {
  long long x = 0, c;
  for (; (unsigned)((c = getchar()) - '0') >= 10;) {
    if (c == '-') return -In();
    if (!~c) throw ~0;
  }
  do {
    x = (x << 3) + (x << 1) + (c - '0');
  } while ((unsigned)((c = getchar()) - '0') < 10);
  return x;
}
namespace EQ {
const double EPS = 1e-10;
bool zero(double r) { return (-EPS <= r && r <= EPS); }
int m, n, o, rank, q[1010 + 1];
double a[1010][1010 + 1010], *aa[1010], x[1010][1010], v[1010][1010];
double &b(int i, int j = 0) { return a[i][n + j]; }
bool solve() {
  int no = n + o, i, j, ii, jj, im;
  double r, s;
  for (i = 0; i < m; ++i) aa[i] = a[i];
  for (ii = 0, jj = 0; ii < m && jj < n; ++jj) {
    for (im = ii, i = ii + 1; i < m; ++i)
      if (abs(aa[im][jj]) < abs(aa[i][jj])) im = i;
    swap(aa[ii], aa[im]);
    if (zero(aa[ii][jj])) continue;
    r = 1 / aa[ii][jj];
    for (j = ii; j < no; ++j) aa[ii][j] *= r;
    for (i = 0; i < m; ++i)
      if (i != ii) {
        if (!zero(s = aa[i][jj])) {
          for (j = ii; j < no; ++j) aa[i][j] -= s * aa[ii][j];
        }
      }
    q[ii++] = jj;
  }
  q[rank = ii] = n;
  memset(x, 0, sizeof(x));
  memset(v, 0, sizeof(v));
  for (j = -1, i = 0; i <= rank; ++i)
    for (++j; j < q[i]; ++j) {
      for (ii = 0; ii < i; ++ii) v[j - i][q[ii]] = -aa[ii][j];
      v[j - i][j] = 1;
    }
  for (i = rank; i < m; ++i)
    for (j = n; j < no; ++j)
      if (!zero(aa[i][j])) return 0;
  for (i = 0; i < rank; ++i)
    for (j = n; j < no; ++j) x[j - n][q[i]] = aa[i][j];
  return 1;
}
}  // namespace EQ
int M, N, H;
int X, Y;
int tr[1010];
double dp[1010][1010];
int main() {
  int x, i, j;
  double b;
  M = in();
  N = in();
  if (N == 1) {
    X = in();
    Y = in();
    printf("%.12f\n", (M - X) * 2.0);
    return 0;
  }
  H = (N + 1) / 2;
  for (i = 0; i < N; ++i) {
    tr[i] = min(i, N - 1 - i);
  }
  EQ::m = EQ::n = EQ::o = N;
  EQ::a[0][tr[0]] += -2.0;
  EQ::a[0][tr[1]] += +1.0;
  for (i = 1; i < H; ++i) {
    EQ::a[i][tr[i - 1]] += +1.0;
    EQ::a[i][tr[i]] += -3.0;
    EQ::a[i][tr[i + 1]] += +1.0;
  }
  for (i = 0; i < H; ++i) {
    EQ::b(i, i) = 1.0;
  }
  EQ::solve();
  X = in();
  Y = in();
  for (x = M - 1; x >= X; --x) {
    for (i = 0; i < H; ++i) {
      b = (i == 0 ? -3.0 : -4.0) - dp[x + 1][i];
      for (j = 0; j < H; ++j) {
        dp[x][j] += EQ::x[i][j] * b;
      }
    }
  }
  printf("%.8f\n", dp[X][tr[Y - 1]]);
  return 0;
}