#include <bits/stdc++.h>
int main() {
  static double aa[1000], bb[1000], cc[1000], dd[1000], cc_[1000], dd_[1000];
  int n, m, i, j, i_, j_;
  scanf("%d%d%d%d", &n, &m, &i_, &j_), i_--, j_--;
  if (m <= 2) {
    printf("%.4f\n", (double)(n - 1 - i_) * (m + 1));
    return 0;
  }
  for (j = 0; j < m; j++) aa[j] = -1;
  aa[0] = 0;
  for (j = 1; j < m - 1; j++) bb[j] = 3;
  bb[0] = bb[m - 1] = 2;
  for (j = 0; j < m; j++) cc[j] = -1;
  cc[m - 1] = 0;
  for (i = n - 1; i > i_; i--) {
    for (j = 1; j < m - 1; j++) dd[j] += 4;
    dd[0] += 3, dd[m - 1] += 3;
    cc_[0] = cc[0] / bb[0];
    dd_[0] = dd[0] / bb[0];
    for (j = 1; j < m; j++) {
      cc_[j] = cc[j] / (bb[j] - cc_[j - 1] * aa[j]);
      dd_[j] = (dd[j] - dd_[j - 1] * aa[j]) / (bb[j] - cc_[j - 1] * aa[j]);
    }
    for (j = m - 2; j >= 0; j--) dd_[j] -= cc_[j] * dd_[j + 1];
    memcpy(dd, dd_, m * sizeof *dd_);
  }
  printf("%.4f\n", dd[j_]);
  return 0;
}
