#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
double A[maxn], B[maxn], C[maxn];
int n, m, x, y;
void gao() {
  if (m == 1) {
    printf("%.10f\n", (n - x) * 2.0);
    return;
  }
  memset(A, 0, sizeof A);
  for (int w = 0; w < n - x; ++w) {
    for (int i = 0; i < m; ++i) B[i] = 0.0;
    for (int ty = 0; ty < 100; ++ty) {
      for (int i = 1; i < m - 1; ++i)
        C[i] = (B[i] + B[i + 1] + B[i - 1] + A[i]) / 4.0 + 1.0;
      C[0] = (B[0] + B[1] + A[0]) / 3.0 + 1.0;
      C[m - 1] = (B[m - 1] + B[m - 2] + A[m - 1]) / 3.0 + 1.0;
      for (int i = 0; i < m; ++i) B[i] = C[i];
    }
    for (int i = 0; i < m; ++i) A[i] = C[i];
  }
  printf("%.10f\n", A[y - 1]);
}
int main() {
  while (cin >> n >> m >> x >> y) {
    gao();
  }
  return 0;
}
