#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ '0');
    ch = getchar();
  }
  return x * f;
}
double a[1005], b[1005], f[1005][1005];
int main() {
  int n = read(), m = read();
  int x = read(), y = read();
  if (m == 1) {
    printf("%.10f\n", 2.0 * (n - x));
    return 0;
  }
  for (int i = n - 1; i >= 1; --i) {
    a[1] = 3.0 / 2.0 + f[i + 1][1] / 2.0, b[1] = 1.0 / 2.0;
    for (int j = 2; j <= m - 1; ++j) {
      a[j] = (double)(4.0 + a[j - 1] + f[i + 1][j]) / (3.0 - b[j - 1]);
      b[j] = (double)1.0 / (3.0 - b[j - 1]);
    }
    f[i][m] = (double)(3.0 + a[m - 1] + f[i + 1][m]) / (2.0 - b[m - 1]);
    for (int j = m - 1; j >= 1; --j) {
      f[i][j] = a[j] + b[j] * f[i][j + 1];
    }
  }
  printf("%.10f\n", f[x][y]);
}
