#include <bits/stdc++.h>
using namespace std;
int n, m, x, y;
double a[1005][1005], b[1005], f[1005], tms;
int main() {
  cin >> n >> m >> x >> y;
  for (int i = n - 1; i >= x; i--) {
    if (m == 1)
      a[1][1] = (double)-1 / 2, b[1] = (double)-f[1] / 2 - 1;
    else {
      a[1][1] = a[m][m] = (double)-2 / 3, a[1][2] = a[m][m - 1] = (double)1 / 3,
      b[1] = (double)-f[1] / 3 - 1, b[m] = (double)-f[m] / 3 - 1;
      for (int j = 2; j < m; j++)
        a[j][j - 1] = a[j][j + 1] = (double)1 / 4, a[j][j] = (double)-3 / 4,
                 b[j] = (double)-f[j] / 4 - 1;
    }
    for (int j = 1; j < m; j++)
      tms = a[j + 1][j] / a[j][j], a[j + 1][j] = 0,
      a[j + 1][j + 1] -= tms * a[j][j + 1], b[j + 1] -= tms * b[j];
    f[m] = b[m] / a[m][m];
    for (int j = m - 1; j; j--)
      f[j] = (b[j] - f[j + 1] * a[j][j + 1]) / a[j][j];
  }
  printf("%.5lf\n", f[y]);
  return 0;
}
