#include <bits/stdc++.h>
const int MAXN = 1010;
int N, M;
int X, Y;
double f[MAXN][MAXN];
double t[MAXN];
double c[MAXN];
void Solve(double *g) {
  for (int i = M - 1; i >= 1; --i) {
    double rate = c[i + 1] * c[i];
    t[i] += c[i] * t[i + 1];
    c[i] /= 1 - rate;
    t[i] /= 1 - rate;
  }
  g[1] = t[1];
  for (int i = 2; i <= M; ++i) g[i] = c[i] * g[i - 1] + t[i];
}
int main() {
  scanf("%d%d%d%d", &N, &M, &X, &Y);
  if (M == 1) {
    printf("%.10f\n", (N - X) * 2.0);
    return 0;
  }
  for (int i = N - 1; i >= 1; --i) {
    c[M] = 1.0 / 2, t[M] = f[i + 1][M] / 2 + 3.0 / 2;
    for (int j = M - 1; j > 1; --j)
      c[j] = 1.0 / 3, t[j] = f[i + 1][j] / 3 + 4.0 / 3;
    c[1] = 1.0 / 2, t[1] = f[i + 1][1] / 2 + 3.0 / 2;
    Solve(f[i]);
  }
  printf("%.10f\n", f[X][Y]);
}
