#include <bits/stdc++.h>
using namespace std;
int n, m, i, j;
double dp[1000][1000];
int main() {
  scanf("%d%d", &n, &m);
  scanf("%d%d", &i, &j);
  for (int i = n - 2; i >= 0; --i) {
    for (int it = 0; it < 64; ++it) {
      for (int j = 0; j < m; ++j)
        if (m == 1)
          dp[i][j] = 2 + dp[i + 1][j];
        else if (j == 0)
          dp[i][j] = 3 / 2.0 * (1 + dp[i + 1][j] / 3 + dp[i][j + 1] / 3);
        else if (j == m - 1)
          dp[i][j] = 3 / 2.0 * (1 + dp[i + 1][j] / 3 + dp[i][j - 1] / 3);
        else
          dp[i][j] =
              4.0 / 3 *
              (1 + dp[i + 1][j] / 4 + dp[i][j - 1] / 4 + dp[i][j + 1] / 4);
    }
  }
  printf("%.9lf\n", dp[i - 1][j - 1]);
  return 0;
}
