#include <bits/stdc++.h>
double f[1005][1005];
int main() {
  register int n, m, x, y;
  scanf("%d%d%d%d", &n, &m, &x, &y);
  for (register int i = n - 1; i >= x; --i)
    for (register int t = 1; t <= 50; ++t) {
      if (m == 1)
        f[i][1] = (f[i][1] + f[i + 1][1]) / 2.0 + 1;
      else {
        f[i][1] = (f[i][1] + f[i][2] + f[i + 1][1]) / 3.0 + 1;
        f[i][m] = (f[i][m] + f[i][m - 1] + f[i + 1][m]) / 3.0 + 1;
        for (register int j = 2; j < m; ++j)
          f[i][j] =
              (f[i][j] + f[i][j - 1] + f[i][j + 1] + f[i + 1][j]) / 4.0 + 1;
      }
    }
  printf("%.5lf\n", f[x][y]);
}
