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 JAVA):

Solution:
import static java.lang.Math.*;
import static java.util.Arrays.*;
import java.io.*;
import java.util.*;

public class Main {
    static boolean LOCAL = System.getSecurityManager() == null;
    Scanner sc = new Scanner(System.in);
    
    void run() {
        int X = sc.nextInt(), Y = sc.nextInt();
        int cx = sc.nextInt(), cy = sc.nextInt();
        double[] e = new double[Y];
        double[] diag = new double[Y];
        double[] sub = new double[Y];
        double[] sup = new double[Y];
        for (int x = X; x > cx; x--) {
            for (int i = 0; i < Y; i++) {
                if (i == 0 && Y == 1) {
                    diag[i] = 1;
                } else if (i == 0) {
                    diag[i] = 2;
                    sup[i] = -1;
                } else if (i + 1 == Y) {
                    diag[i] = 2;
                    sub[i - 1] = -1;
                } else {
                    diag[i] = 3;
                    sub[i - 1] = -1;
                    sup[i] = -1;
                }
                if (i == 0 && Y == 1) {
                    e[i] += 2;
                } else if (i == 0) {
                    e[i] += 3;
                } else if (i + 1 == Y) {
                    e[i] += 3;
                } else {
                    e[i] += 4;
                }
            }
            guess3(diag, sub, sup, e);
        }
        System.out.printf("%.10f%n", e[cy - 1]);
    }
    
    void guess3(double[] diag, double[] sub, double[] sup, double[] b) {
        int n = diag.length;
        for (int i = 0; i < n - 1; i++) {
            double t = sub[i] / diag[i];
            diag[i + 1] -= t * sup[i];
            b[i + 1] -= t * b[i];
        }
        b[n - 1] /= diag[n - 1];
        for (int i = n - 2; i >= 0; i--) {
            b[i] = (b[i] - sup[i] * b[i + 1]) / diag[i];
        }
    }
    
    class Scanner {
        BufferedReader br;
        StringTokenizer st;
        Scanner(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
            eat("");
        }
        void eat(String s) {
            st = new StringTokenizer(s);
        }
        String nextLine() {
            try {
                return br.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        boolean hasNext() {
            while (!st.hasMoreTokens()) {
                String s = nextLine();
                if (s == null) return false;
                eat(s);
            }
            return true;
        }
        String next() {
            hasNext();
            return st.nextToken();
        }
        int nextInt() {
            return Integer.parseInt(next());
        }
        long nextLong() {
            return Long.parseLong(next());
        }
        double nextDouble() {
            return Double.parseDouble(next());
        }
    }
    
    void debug(Object...os) {
        System.err.println(deepToString(os));
    }
    
    public static void main(String[] args) {
        if (LOCAL) {
            try {
                System.setIn(new FileInputStream("in.txt"));
            } catch (Throwable e) {
                LOCAL = false;
            }
        }
        if (!LOCAL) {
            try {
                System.setOut(new PrintStream(new BufferedOutputStream(System.out)));
            } catch (Throwable e) {
            }
        }
        new Main().run();
        System.out.flush();
    }
}