#include <bits/stdc++.h>
using namespace std;
double f[1000][1000], b[1000], pp[1000][2];
int main() {
  int N, M, x, y;
  scanf("%d %d", &N, &M);
  scanf("%d %d", &x, &y);
  if (M == 1) {
    for (int i = N - 2; i >= 0; --i) f[i][M - 1] = f[i + 1][M - 1] + 2;
  } else {
    for (int i = N - 2; i >= 0; --i) {
      for (int j = 0; j < M; ++j) {
        if (j == 0 || j == M - 1)
          b[j] = f[i + 1][j] + 3.0;
        else
          b[j] = f[i + 1][j] + 4.0;
        if (j == 0) {
          pp[j][0] = 2.0;
          pp[j][1] = -1.0;
        }
        if (j == M - 1) {
          pp[j][0] = 2.0;
          pp[j][1] = 0.0;
        }
        if (j > 0 && j < M - 1) {
          pp[j][0] = 3.0;
          pp[j][1] = -1.0;
        }
      }
      for (int j = 0; j < M - 1; ++j) {
        pp[j + 1][0] = pp[j + 1][0] + pp[j][1] / pp[j][0];
        b[j + 1] = b[j + 1] + b[j] / pp[j][0];
      }
      for (int j = M - 1; j >= 1; --j) {
        f[i][j] = b[j] / pp[j][0];
        b[j - 1] -= f[i][j] * pp[j - 1][1];
      }
      f[i][0] = b[0] / pp[0][0];
    }
  }
  printf("%.10f\n", f[x - 1][y - 1]);
  return 0;
}
