#include <bits/stdc++.h>
using namespace std;
const int maxn = 1003, INF = 1050000000;
int N, M, X, Y, n, gt[maxn][maxn];
double a[maxn * maxn][5];
void gauss() {
  for (int i = N - 1; i >= X; i--) {
    int x = gt[i][1], y;
    a[x][4] -= a[x][3] * a[gt[i + 1][1]][4];
    a[x][3] = 0;
    a[x][2] /= a[x][0], a[x][4] /= a[x][0];
    a[x][0] = 1;
    for (int j = 2; j <= M; j++) {
      x = gt[i][j], y = gt[i][j - 1];
      a[x][0] -= a[y][2] * a[x][1];
      a[x][4] -= (a[x][3] * a[gt[i + 1][j]][4] + a[y][4] * a[x][1]);
      a[x][3] = 0;
      a[x][1] = 0;
      a[x][2] /= a[x][0], a[x][4] /= a[x][0];
      a[x][0] = 1;
    }
    for (int j = M - 1; j >= 1; j--) {
      x = gt[i][j], y = gt[i][j + 1];
      a[x][4] -= a[x][2] * a[y][4];
      a[x][2] = 0;
    }
  }
}
int main() {
  scanf("%d%d%d%d", &N, &M, &X, &Y);
  n = 0;
  for (int i = X; i <= N; i++) {
    for (int j = 1; j <= M; j++) {
      gt[i][j] = ++n;
    }
  }
  for (int i = X; i <= N; i++) {
    for (int j = 1; j <= M; j++) {
      if (i == N) {
        int x = gt[i][j];
        a[x][0] = 1;
      } else {
        int x = gt[i][j], cnt = 1;
        a[x][0] = 1;
        if (j > 1) a[x][1] = 1, cnt++;
        if (j < M) a[x][2] = 1, cnt++;
        if (i < N) a[x][3] = 1, cnt++;
        a[x][0] -= cnt, a[x][4] = -cnt;
      }
    }
  }
  gauss();
  printf("%.8lf\n", a[gt[X][Y]][4]);
  return 0;
}
