#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int n, m, bx, by;
double f[N][N];
int main() {
  scanf("%d%d%d%d", &n, &m, &bx, &by);
  for (int i = n - 1; i >= bx; --i)
    for (int t = 1; t <= 80; ++t)
      for (int j = 1; j <= m; ++j) {
        if (m == 1)
          f[i][j] = (f[i + 1][j] * 1.0 / 2.0 + 1.0) * 2.0;
        else {
          if (j == 1)
            f[i][j] =
                (f[i + 1][j] * 1.0 / 3.0 + f[i][j + 1] * 1.0 / 3.0 + 1.0) /
                (1.0 - 1.0 / 3.0);
          else if (j == m)
            f[i][j] =
                (f[i + 1][j] * 1.0 / 3.0 + f[i][j - 1] * 1.0 / 3.0 + 1.0) /
                (1.0 - 1.0 / 3.0);
          else
            f[i][j] = (f[i + 1][j] * 1.0 / 4.0 + f[i][j + 1] * 1.0 / 4.0 +
                       f[i][j - 1] / 4.0 + 1.0) /
                      (1.0 - 1.0 / 4.0);
        }
      }
  printf("%7lf\n", f[bx][by]);
  return 0;
}
