#include <bits/stdc++.h>
using namespace std;
const int M = 1005;
double c[M], p[M], a[M], q[M], ans;
int n, m, x, y;
int main() {
  scanf("%d%d%d%d", &n, &m, &x, &y);
  if (m == 1)
    ans = 2.0 * (n - x);
  else {
    for (int i = n - 1; i >= x; i--) {
      p[1] = 2.0;
      q[1] = c[1] + 3;
      for (int j = 2; j <= m - 1; j++) {
        p[j] = 3.0 - 1 / p[j - 1];
        q[j] = c[j] + 4 + q[j - 1] / p[j - 1];
      }
      a[m] = (c[m] + 3 + q[m - 1] / p[m - 1]) / (2.0 - 1 / p[m - 1]);
      for (int j = m - 1; j >= 1; j--) a[j] = (q[j] + a[j + 1]) / p[j];
      for (int j = 1; j <= m; j++) c[j] = a[j];
    }
    ans = a[y];
  }
  printf("%.4f\n", ans);
  return 0;
}
