#include <bits/stdc++.h>
using namespace std;
double f[1005][1005];
int main() {
  int n, m, x, y;
  cin >> n >> m >> x >> y;
  for (int i = n - 1; i >= x; i--)
    for (int k = 1; k <= 50; k++)
      for (int j = 1; j <= m; j++) {
        if (m == 1)
          f[i][1] = (f[i][1] + f[i + 1][1]) / 2 + 1;
        else if (j == 1)
          f[i][1] = (f[i][1] + f[i][2] + f[i + 1][1]) / 3 + 1;
        else if (j == m)
          f[i][m] = (f[i][m] + f[i][m - 1] + f[i + 1][m]) / 3 + 1;
        else
          f[i][j] = (f[i][j - 1] + f[i][j] + f[i][j + 1] + f[i + 1][j]) / 4 + 1;
      }
  cout << f[x][y] << endl;
}
