#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const double eps = 1e-6;
const int inf = 0x3f3f3f3f;
const int N = 1e3 + 10;
double dp[N][N];
int main() {
  int n, m, a, b;
  scanf("%d%d%d%d", &n, &m, &a, &b);
  if (a == n) {
    printf("0.0000000000\n");
  } else {
    for (int i = n - 1; i >= 1; i--) {
      for (int k = 1; k <= 100; k++) {
        for (int j = 1; j <= m; j++) {
          if (m == 1) {
            dp[i][1] = (dp[i + 1][1] * 1.0 / 2 + 1) / (1.0 / 2);
          } else if (j == 1) {
            dp[i][j] = (dp[i + 1][j] * 1.0 / 3 + dp[i][j + 1] * 1.0 / 3 + 1) /
                       (2.0 / 3);
          } else if (j == m) {
            dp[i][j] = (dp[i + 1][j] * 1.0 / 3 + dp[i][j - 1] * 1.0 / 3 + 1) /
                       (2.0 / 3);
          } else {
            dp[i][j] = (dp[i + 1][j] * 1.0 / 4 + dp[i][j - 1] * 1.0 / 4 +
                        dp[i][j + 1] * 1.0 / 4 + 1) /
                       (3.0 / 4);
          }
        }
      }
    }
    printf("%.10lf\n", dp[a][b]);
  }
  return 0;
}
