#include <bits/stdc++.h>
using namespace std;
const int N = 1e3;
double dp[N + 10][N + 10];
int main() {
  int n, m, x, y;
  scanf("%d %d %d %d", &n, &m, &x, &y);
  for (int i = n - 1; i; i--) {
    for (int qwq = 1; qwq <= 100; qwq++) {
      for (int j = 1; j <= m; j++) {
        if (m == 1)
          dp[i][j] = (dp[i][j] + dp[i + 1][j]) / 2.0 + 1;
        else {
          if (j == 1)
            dp[i][j] = (dp[i][j] + dp[i][j + 1] + dp[i + 1][j]) / 3.0 + 1;
          else if (j == m)
            dp[i][j] = (dp[i][j] + dp[i][j - 1] + dp[i + 1][j]) / 3.0 + 1;
          else
            dp[i][j] =
                (dp[i][j] + dp[i][j + 1] + dp[i + 1][j] + dp[i][j - 1]) / 4.0 +
                1;
        }
      }
    }
  }
  printf("%.4lf", dp[x][y]);
}
