#include <bits/stdc++.h>
int n, m, p, q;
double a[1000], f[1000];
int main() {
  scanf("%d%d%d%d", &n, &m, &p, &q);
  if (m == 1) {
    printf("%.10f\n", 2.0 * (n - p));
    return 0;
  }
  a[0] = 0.5;
  for (int i = 1; i < m - 1; i++) a[i] = 1 / (3 - a[i - 1]);
  a[m - 1] = 1 / (2 - a[m - 2]);
  while (p++ < n) {
    f[0] += 3;
    f[m - 1] += 3;
    for (int i = 1; i < m - 1; i++) f[i] += 4;
    for (int i = 1; i < m; i++) f[i] += a[i - 1] * f[i - 1];
    for (int i = m - 1; i >= 0; i--) {
      f[i] *= a[i];
      if (i) f[i - 1] += f[i];
    }
  }
  printf("%.10f\n", f[q - 1]);
  return 0;
}
