#include <bits/stdc++.h>
using namespace std;
int n, m, x, y;
double f[1005][1005], C[1005], A[1005];
int main() {
  scanf("%d%d%d%d", &n, &m, &x, &y);
  if (m == 1) {
    double ans = 0;
    for (int i = n - 1; i >= x; i--) ans += 2;
    printf("%.4f", ans);
    return 0;
  }
  for (int i = n - 1; i >= x; i--) {
    for (int j = 1; j <= m; j++) C[j] = f[i + 1][j] + 4.0;
    C[1] = f[i + 1][1] + 3.0, C[m] = f[i + 1][m] + 3.0;
    A[1] = 2.0;
    for (int j = 2; j <= m - 1; j++) {
      C[j] = C[j] + C[j - 1] / A[j - 1];
      A[j] = 3.0 - 1.0 / A[j - 1];
    }
    f[i][m] = (C[m - 1] / A[m - 1] + C[m]) / (2.0 - 1.0 / A[m - 1]);
    for (int j = m - 1; j >= 1; j--) f[i][j] = (C[j] + f[i][j + 1]) / A[j];
  }
  printf("%.4f", f[x][y]);
  return 0;
}
