#include <bits/stdc++.h>
using namespace std;
const int N5 = 211111;
double G[N5], old[N5], cur[N5];
int main() {
  int n, m, x, y;
  cin >> n >> m >> x >> y;
  if (m == 1) {
    double g = 0.0, curr = 0.0, ol = 0.0;
    while (x < n) {
      for (int i = 0; i < 128; i++) {
        curr = (ol + g) / 2.0 + 1.0;
        ol = curr;
      }
      g = curr;
      x++;
    }
    printf("%.10lf\n", g);
    return 0;
  }
  while (x < n) {
    for (int c = 0; c < 128; c++) {
      cur[1] = (old[1] + old[2] + G[1]) / 3.0 + 1.0;
      cur[m] = (old[m] + old[m - 1] + G[m]) / 3.0 + 1.0;
      for (int i = 2; i < m; i++) {
        cur[i] = (old[i] + old[i - 1] + old[i + 1] + G[i]) / 4.0 + 1.0;
      }
      for (int i = 1; i <= m; i++) old[i] = cur[i];
    }
    for (int i = 1; i <= m; i++) {
      G[i] = cur[i];
    }
    x++;
  }
  printf("%.10lf\n", G[y]);
}
