#include <bits/stdc++.h>
int n, m, x, y;
double ans[1011][1011];
int main() {
  scanf("%d %d", &n, &m);
  scanf("%d %d", &x, &y);
  x--, y--;
  for (int i = n - 2; i >= x; i--) {
    for (int runs = 0; runs < 50; runs++) {
      for (int j = 0; j < m; j++) {
        if (m == 1) {
          ans[i][j] = (ans[i][j] + ans[i + 1][j]) / 2 + 1.0;
          continue;
        }
        if (j == 0)
          ans[i][j] = (ans[i][j] + ans[i][j + 1] + ans[i + 1][j]) / 3.0 + 1.0;
        else if (j == m - 1)
          ans[i][j] = (ans[i][j] + ans[i][j - 1] + ans[i + 1][j]) / 3.0 + 1.0;
        else
          ans[i][j] =
              (ans[i][j - 1] + ans[i][j] + ans[i][j + 1] + ans[i + 1][j]) /
                  4.0 +
              1.0;
      }
    }
  }
  printf("%.4lf\n", ans[x][y]);
}
