#include <bits/stdc++.h>
using namespace std;
int a[1010];
double b[1010], c[1010];
int main() {
  int n, m, x, y;
  cin >> n >> m >> x >> y;
  if (n == x) {
    cout << "0" << endl;
    return 0;
  }
  for (int i = 1; i <= m; i++) {
    if (i == 1 && i == m)
      a[i] = 2;
    else if (i == 1 || i == m)
      a[i] = 3;
    else
      a[i] = 4;
  }
  n -= x;
  for (int i = 1; i <= n; i++) {
    memset(b, 0, sizeof(b));
    for (int j = 1; j <= 100; j++) {
      for (int k = 1; k <= m; k++)
        b[k] = (b[k] + b[k - 1] + b[k + 1] + c[k]) / a[k] + 1;
    }
    swap(b, c);
  }
  printf("%.9lf\n", c[y]);
}
