#include <bits/stdc++.h>
using namespace std;
template <class T>
void pv(T a, T b) {
  for (T i = a; i != b; ++i) cout << *i << " ";
  cout << endl;
}
template <class T>
void pvp(T a, T b) {
  for (T i = a; i != b; ++i)
    cout << "(" << i->first << ", " << i->second << ") ";
  cout << endl;
}
void chmin(int &t, int f) {
  if (t > f) t = f;
}
void chmax(int &t, int f) {
  if (t < f) t = f;
}
void chmin(long long &t, long long f) {
  if (t > f) t = f;
}
void chmax(long long &t, long long f) {
  if (t < f) t = f;
}
void chmin(double &t, double f) {
  if (t > f) t = f;
}
void chmax(double &t, double f) {
  if (t < f) t = f;
}
int in_c() {
  int c;
  for (; (c = getchar()) <= ' ';) {
    if (!~c) throw ~0;
  }
  return c;
}
int in() {
  int x = 0, c;
  for (; (unsigned)((c = getchar()) - '0') >= 10;) {
    if (c == '-') return -in();
    if (!~c) throw ~0;
  }
  do {
    x = (x << 3) + (x << 1) + (c - '0');
  } while ((unsigned)((c = getchar()) - '0') < 10);
  return x;
}
long long In() {
  long long x = 0, c;
  for (; (unsigned)((c = getchar()) - '0') >= 10;) {
    if (c == '-') return -In();
    if (!~c) throw ~0;
  }
  do {
    x = (x << 3) + (x << 1) + (c - '0');
  } while ((unsigned)((c = getchar()) - '0') < 10);
  return x;
}
namespace EQ {
const double EPS = 1e-10;
bool zero(double r) { return (-EPS <= r && r <= EPS); }
int m, n, o, rank, q[1010 + 1];
double a[1010][1010 + 1010], *aa[1010], x[1010][1010], v[1010][1010];
double &b(int i, int j = 0) { return a[i][n + j]; }
bool solve() {
  int no = n + o, i, j, ii, jj, im;
  double r, s;
  for (i = 0; i < m; ++i) aa[i] = a[i];
  for (ii = 0, jj = 0; ii < m && jj < n; ++jj) {
    for (im = ii, i = ii + 1; i < m; ++i)
      if (abs(aa[im][jj]) < abs(aa[i][jj])) im = i;
    swap(aa[ii], aa[im]);
    if (zero(aa[ii][jj])) continue;
    r = 1 / aa[ii][jj];
    for (j = ii; j < no; ++j) aa[ii][j] *= r;
    for (i = 0; i < m; ++i)
      if (i != ii) {
        if (!zero(s = aa[i][jj])) {
          for (j = ii; j < no; ++j) aa[i][j] -= s * aa[ii][j];
        }
      }
    q[ii++] = jj;
  }
  q[rank = ii] = n;
  memset(x, 0, sizeof(x));
  memset(v, 0, sizeof(v));
  for (j = -1, i = 0; i <= rank; ++i)
    for (++j; j < q[i]; ++j) {
      for (ii = 0; ii < i; ++ii) v[j - i][q[ii]] = -aa[ii][j];
      v[j - i][j] = 1;
    }
  for (i = rank; i < m; ++i)
    for (j = n; j < no; ++j)
      if (!zero(aa[i][j])) return 0;
  for (i = 0; i < rank; ++i)
    for (j = n; j < no; ++j) x[j - n][q[i]] = aa[i][j];
  return 1;
}
}  // namespace EQ
int M, N, H;
int X, Y;
int tr[1010];
double dp[1010][1010];
int main() {
  int x, i, j;
  double b;
  M = in();
  N = in();
  if (N == 1) {
    X = in();
    Y = in();
    printf("%.12f\n", (M - X) * 2.0);
    return 0;
  }
  H = (N + 1) / 2;
  for (i = 0; i < N; ++i) {
    tr[i] = min(i, N - 1 - i);
  }
  EQ::m = EQ::n = EQ::o = N;
  EQ::a[0][tr[0]] += -2.0;
  EQ::a[0][tr[1]] += +1.0;
  for (i = 1; i < H; ++i) {
    EQ::a[i][tr[i - 1]] += +1.0;
    EQ::a[i][tr[i]] += -3.0;
    EQ::a[i][tr[i + 1]] += +1.0;
  }
  for (i = 0; i < H; ++i) {
    EQ::b(i, i) = 1.0;
  }
  EQ::solve();
  X = in();
  Y = in();
  for (x = M - 1; x >= X; --x) {
    for (i = 0; i < H; ++i) {
      b = (i == 0 ? -3.0 : -4.0) - dp[x + 1][i];
      for (j = 0; j < H; ++j) {
        dp[x][j] += EQ::x[i][j] * b;
      }
    }
  }
  printf("%.8f\n", dp[X][tr[Y - 1]]);
  return 0;
}
