#include <bits/stdc++.h>
using namespace std;
int N, M;
const double EPS = 1E-9;
double solve(int r, int c) {
  vector<double> res(M, 0);
  for (int y = N - 2; y >= r; y--) {
    if (M == 1) {
      res[0] = 2 + res[0];
    } else {
      vector<double> a(M), b(M);
      a[0] = 1 / 2.0;
      b[0] = (3 + res[0]) / 2;
      for (int j = 1; j < M; j++) {
        a[j] = 1.0 / (3 - a[j - 1]);
        b[j] = (4 + res[j] + b[j - 1]) / (3 - a[j - 1]);
      }
      res[M - 1] = (b[M - 2] + 3 + res[M - 1]) / (2 - a[M - 2]);
      for (int j = M - 2; j >= 0; j--) {
        res[j] = a[j] * res[j + 1] + b[j];
      }
    }
  }
  return res[c];
}
int main(int argc, char* argv[]) {
  scanf("%d %d", &N, &M);
  int r, c;
  scanf("%d %d", &r, &c);
  double res = solve(r - 1, c - 1);
  printf("%9lf\n", res);
  return 0;
}
