#include <bits/stdc++.h>
double w[1005][1005];
int d[1005];
int main(void) {
  int n, m, a, b;
  scanf("%d%d%d%d", &n, &m, &a, &b);
  for (int i = 1; i <= m; i++) {
    d[i] = 2;
    if (i > 1) d[i]++;
    if (i < m) d[i]++;
  }
  for (int i = a + 1; i <= n; i++) {
    for (int t = 0; t < 100; t++) {
      for (int j = 1; j <= m; j++) {
        double Q = w[i][j - 1] + w[i - 1][j] + w[i][j] + w[i][j + 1];
        w[i][j] = 1.0 + Q / d[j];
      }
    }
  }
  printf("%.8lf\n", w[n][b]);
  return 0;
}
