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