#include <bits/stdc++.h>
using namespace std;
int n, m, X, Y;
double f[1010], g[1010][1010];
void Giaos() {
  for (int i = 1; i < n; i++) {
    double tmp = g[i + 1][i] / g[i][i];
    g[i + 1][i] = 0, g[i + 1][i + 1] -= tmp * g[i][i + 1],
          g[i + 1][n + 1] -= tmp * g[i][n + 1];
  }
  f[n] = g[n][n + 1] / g[n][n];
  for (int i = n - 1; i >= 1; i--)
    f[i] = (g[i][n + 1] - g[i][i + 1] * f[i + 1]) / g[i][i];
}
int main() {
  scanf("%d%d%d%d", &m, &n, &X, &Y), m -= X - 1, X = 1;
  if (m == 1) {
    puts("0");
    return 0;
  }
  if (n == 1) {
    printf("%d\n", (m - 1) * 2);
    return 0;
  }
  for (int i = 1; i < m; i++) {
    g[1][1] = 2, g[1][2] = -1, g[1][n + 1] = f[1] + 3;
    g[n][n] = 2, g[n][n - 1] = -1, g[n][n + 1] = f[n] + 3;
    for (int j = 2; j < n; j++)
      g[j][j - 1] = g[j][j + 1] = -1, g[j][j] = 3, g[j][n + 1] = f[j] + 4;
    Giaos();
  }
  printf("%lf\n", f[Y]);
  return 0;
}
