#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000;
void gauss(double a[][maxn], int n, int m) {
  for (int i = 1; i < n; ++i) {
    double temp = a[i][i] / a[i + 1][i];
    a[i][m + 1] /= a[i][i];
    a[i + 1][m + 1] /= a[i + 1][i];
    a[i + 1][m + 1] -= a[i][m + 1];
    for (int j = min(i + 2, m); j >= i && j <= m; --j) {
      a[i + 1][j] = a[i + 1][j] / a[i + 1][i];
      a[i][j] = a[i][j] / a[i][i];
      a[i + 1][j] -= a[i][j];
    }
  }
  for (int i = m; i >= 1; --i) {
    a[i][i] = (a[i][m + 1] / a[i][i] - a[i + 1][i + 1] / a[i][i] * a[i][i + 1]);
  }
}
double ans[maxn][maxn], tp[maxn][maxn];
int main() {
  int n, m, x, y;
  scanf("%d %d %d %d", &n, &m, &x, &y);
  if (m == 1) {
    for (int i = n - 1; i >= x; --i) {
      ans[n][i] = (ans[n][i + 1] / 2 + 1) * 2;
    }
    printf("%.10f\n", ans[n][x]);
    return 0;
  }
  for (int i = n - 1; i >= x; --i) {
    for (int j = 1; j <= m; ++j) {
      if (j == 1) {
        tp[j][j] = 2.0 / 3;
        tp[j][j + 1] = -1.0 / 3;
        tp[j][m + 1] = 1.0 / 3 * ans[i + 1][j] + 1.0;
      } else if (j == m) {
        tp[j][j] = 2.0 / 3;
        tp[j][j - 1] = -1.0 / 3;
        tp[j][m + 1] = 1.0 / 3 * ans[i + 1][j] + 1.0;
      } else {
        tp[j][j] = 3.0 / 4;
        tp[j][j + 1] = -1.0 / 4;
        tp[j][j - 1] = -1.0 / 4;
        tp[j][m + 1] = 1.0 / 4 * ans[i + 1][j] + 1.0;
      }
    }
    gauss(tp, m, m);
    for (int j = 1; j <= m; ++j) {
      ans[i][j] = tp[j][j];
    }
  }
  printf("%.10f\n", ans[x][y]);
  return 0;
}
