Problem: You received as a gift a very clever robot walking on a rectangular board. Unfortunately, you understood that it is broken and behaves rather strangely (randomly). The board consists of N rows and M columns of cells. The robot is initially at some cell on the i-th row and the j-th column. Then at every step the robot could go to some another cell. The aim is to go to the bottommost (N-th) row. The robot can stay at it's current cell, move to the left, move to the right, or move to the cell below the current. If the robot is in the leftmost column it cannot move to the left, and if it is in the rightmost column it cannot move to the right. At every step all possible moves are equally probable. Return the expected number of step to reach the bottommost row.

Input

On the first line you will be given two space separated integers N and M (1 ≤ N, M ≤ 1000). On the second line you will be given another two space separated integers i and j (1 ≤ i ≤ N, 1 ≤ j ≤ M) — the number of the initial row and the number of the initial column. Note that, (1, 1) is the upper left corner of the board and (N, M) is the bottom right corner.

Output

Output the expected number of steps on a line of itself with at least 4 digits after the decimal point.

Examples

Input

10 10
10 4


Output

0.0000000000


Input

10 14
5 14


Output

18.0038068653

Solution (in PYTHON3):

Solution:
import sys

n, m = input().split()
x, y = input().split()
n = int(n)
m = int(m)
x = int(x)
y = int(y)
if m == 1:
    ans = 0
    for i in range(n - 1, x - 1, -1):
        ans = ans + 2
    print(format(ans, '.4f'))
    sys.exit()
td = [0] * m
tu = [0] * m
dv = [0] * m
mat = []
v = [0] * m
matrow = [0] * m
matrow[0] = -2
matrow[1] = 1
mat.append(matrow)
for i in range(1, m - 1):
    matrow = [0] * m
    matrow[i] = -3
    matrow[i - 1] = 1
    matrow[i + 1] = 1
    mat.append(matrow)
matrow = [0] * m
matrow[m - 1] = -2
matrow[m - 2] = 1
mat.append(matrow)
for i in range(0, m - 1):
    td[i + 1] = mat[i + 1][i] / mat[i][i]
    mat[i + 1][i] = mat[i + 1][i] - mat[i][i] * td[i + 1]
    if i + 1 < m:
        mat[i + 1][i + 1] = mat[i + 1][i + 1] - mat[i][i + 1] * td[i + 1]
for i in range(0, m):
    if i + 1 < m:
        tu[i] = mat[i][i + 1]
    dv[i] = mat[i][i]
for i in range(n - 1, x - 1, -1):
    v[0] = -v[0] - 3
    v[m - 1] = -v[m - 1] - 3
    for j in range(1, m - 1):
        v[j] = -v[j] - 4
    for j in range(1, m):
        v[j] = v[j] - v[j - 1] * td[j]
    for j in range(m - 1, -1, -1):
        if j != m - 1:
            v[j] = v[j] - v[j + 1] * tu[j]
        v[j] = v[j] / dv[j]
print(format(v[y - 1], '.4f'))