#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int x, y, n, m;
double f[N][N], d[N][N];
void g() {
  for (int i = 1; i <= m; i++) {
    double w = 1.0 / d[i][i];
    d[i][i] = 1;
    d[i][m + 1] *= w;
    if (i == m) break;
    d[i][i + 1] *= w;
    w = d[i + 1][i];
    d[i + 1][i] = 0;
    d[i + 1][i + 1] -= w * d[i][i + 1];
    d[i + 1][m + 1] -= w * d[i][m + 1];
  }
  for (int i = m - 1; i >= 1; i--) d[i][m + 1] -= d[i + 1][m + 1] * d[i][i + 1];
}
int main() {
  scanf("%d%d%d%d", &n, &m, &x, &y);
  if (m == 1) {
    printf("%.4lf", (double)(n - x) * 2);
    return 0;
  }
  for (int i = n - 1; i >= x; i--) {
    d[1][1] = d[m][m] = -2.0 / 3.0;
    d[1][2] = d[m][m - 1] = 1.0 / 3.0;
    d[1][m + 1] = -f[i + 1][1] / 3.0 - 1;
    d[m][m + 1] = -f[i + 1][m] / 3.0 - 1;
    for (int j = 2; j < m; j++) {
      d[j][j] = -3.0 / 4.0;
      d[j][j - 1] = d[j][j + 1] = 1 / 4.0;
      d[j][m + 1] = -f[i + 1][j] / 4.0 - 1;
    }
    g();
    for (int j = 1; j <= m; j++) f[i][j] = d[j][m + 1];
  }
  printf("%.4lf", f[x][y]);
  return 0;
}
