#include <bits/stdc++.h>
using namespace std;
int n, m, S, T;
double f[1050][1050];
int read() {
  int x = 0, k = 1;
  char c;
  c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') k = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x * k;
}
void DP(int p, int x, double k, double t) {
  if (!x) return;
  if (x == 1) {
    f[p][x] = (f[p + 1][x] + 3.0 + t) / (2.0 - k);
    return;
  }
  double k1 = 1 / (3.0 - k), t1 = (f[p + 1][x] + 4.0 + t) / (3.0 - k);
  DP(p, x - 1, k1, t1);
  f[p][x] = f[p][x - 1] * k1 + t1;
}
int main() {
  n = read(), m = read(), S = read(), T = read();
  for (int i = n - 1; i >= 1; i--) {
    double k = 0.5, t = 0.5 * (3.0 + f[i + 1][m]);
    DP(i, m - 1, k, t);
    if (m == 1)
      f[i][m] = f[i + 1][m] + 2.0;
    else
      f[i][m] = k * f[i][m - 1] + t;
  }
  printf("%.10lf\n", f[S][T]);
  return 0;
}
