#include <bits/stdc++.h>
using namespace std;
int n, m, k, l;
double g[1010][1010], s[1010], r[1010];
int main() {
  scanf("%d%d%d%d", &n, &m, &k, &l);
  n = n - k;
  if (m == 1) {
    printf("%lf\n", 2.0 * n);
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    s[1] = (3.0 + g[i - 1][1]) / 2.0;
    r[1] = 0.5;
    for (int j = 2; j < m; j++) {
      s[j] = (s[j - 1] + g[i - 1][j] + 4.0) / (3.0 - r[j - 1]);
      r[j] = 1.0 / (3.0 - r[j - 1]);
    }
    g[i][m] = (3.0 + s[m - 1] + g[i - 1][m]) / (2.0 - r[m - 1]);
    for (int j = m - 1; j > 0; j--) g[i][j] = s[j] + r[j] * g[i][j + 1];
  }
  printf("%lf\n", g[n][l]);
  return 0;
}
