#include <bits/stdc++.h>
using namespace std;
int N, M;
double e[1010];
double A[1010][1010];
double b[1010];
void gauss() {
  const int T = 1;
  for (int i = 0; i < (int)(M); i++) {
    int lo = max(0, i - T);
    int hi = min(M, i + T + 1);
    for (int k = i + 1; k < hi; ++k) {
      double s = A[k][i] / A[i][i];
      for (int j = lo; j < hi; ++j) A[k][j] -= A[i][j] * s;
      b[k] -= b[i] * s;
    }
  }
  for (int i = M - 1; i >= 0; --i) {
    int hi = min(M, i + T + 1);
    for (int j = i + 1; j < hi; ++j) b[i] -= A[i][j] * b[j];
    b[i] /= A[i][i];
  }
}
int main() {
  while (2 == scanf("%d%d", &N, &M)) {
    int I, J;
    scanf("%d%d", &I, &J);
    if (M == 1) {
      double e = 0.0;
      for (int i = 0; i < (int)(N - I); i++) e = 2 + e;
      printf("%.10f\n", e);
      continue;
    }
    for (int r = N - 1; r >= I; --r) {
      for (int j = 0; j < (int)(M); j++) {
        if (j == 0) {
          A[j][j] = 1. - 1. / 3.;
          A[j][j + 1] = -1. / 3.;
          b[j] = 1. + e[j] / 3.;
        } else if (j == M - 1) {
          A[j][j - 1] = -1. / 3.;
          A[j][j] = 1. - 1. / 3.;
          b[j] = 1. + e[j] / 3.;
        } else {
          A[j][j - 1] = -1. / 4.;
          A[j][j] = 1. - 1. / 4.;
          A[j][j + 1] = -1. / 4.;
          b[j] = 1. + e[j] / 4.;
        }
      }
      gauss();
      memcpy(e, b, sizeof(e));
    }
    printf("%.10f\n", e[J - 1]);
  }
  return 0;
}
