#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 100;
double a[maxn], b[maxn], dp[maxn][maxn];
int main() {
  int n, m, x, y;
  scanf("%d %d %d %d", &n, &m, &x, &y);
  if (m == 1) {
    printf("%lf\n", 2.0 * (n - x));
    return 0;
  }
  for (int i = 0; i <= m; i++) dp[n][i] = 0;
  for (int i = n - 1; i >= 1; i--) {
    a[1] = (3 + dp[i + 1][1]) / 2.0;
    b[1] = 1.0 / 2;
    for (int j = 2; j < m; j++) {
      a[j] = (4 + a[j - 1] + dp[i + 1][j]) / (3 - b[j - 1]);
      b[j] = 1 / (3 - b[j - 1]);
    }
    dp[i][m] = (3 + a[m - 1] + dp[i + 1][m]) / (2 - b[m - 1]);
    for (int j = m - 1; j >= 1; j--) {
      dp[i][j] = a[j] + b[j] * dp[i][j + 1];
    }
  }
  printf("%lf\n", dp[x][y]);
}
