#include <bits/stdc++.h>
using namespace std;
double dp[1100][1100];
int main() {
  int n, m;
  while (~scanf("%d%d", &n, &m)) {
    memset(dp, 0, sizeof(dp));
    int a, b;
    scanf("%d%d", &a, &b);
    if (a == n)
      printf("0.0000000000\n");
    else {
      for (int i = n - 1; i >= a; 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] * 0.5 + 1) * 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;
}
