#include <bits/stdc++.h>
int n, m, x, y, i, j, k, a[1001];
double dp[1001][1001];
int main() {
  scanf("%d%d%d%d", &n, &m, &x, &y);
  for (i = 1; i <= m; ++i) a[i] = 2 + (i > 1) + (i < m);
  for (i = n - 1; i >= x; --i)
    for (k = 0; k < 45; ++k)
      for (j = 1; j <= m; ++j)
        dp[i][j] =
            (dp[i][j] + dp[i + 1][j] + dp[i][j - 1] + dp[i][j + 1]) / a[j] + 1;
  printf("%lf", dp[x][y]);
}
