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