import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int bx = scan.nextInt();
        int by = scan.nextInt();
        int mx = scan.nextInt();
        int my = scan.nextInt();
        //int型在20 * 20 棋盘会超
        long[][] dp = new long[bx + 1][by + 1];
        // 判断马在棋盘内
        if (mx <= bx && my <= by){
            dp[mx][my] = -1;
        }
        //将马能到达的位置置为 -1
        for (int i = 0; i <= bx; i++) {
            for (int j = 0; j <= by; j++) {
                if (mx != i && my != j && Math.abs(i - mx) + Math.abs(j - my) == 3) {
                    dp[i][j] = -1;
                }
            }
        }
        System.out.println(process(dp, bx, by));
    }

    public static long process(long[][] dp, int bx, int by) {
		//最后一列,无法到达右边,是特殊情况1
        for (int j = by; j >= 0; j--) {
            if (dp[bx][j] == -1) break;
            dp[bx][j] = 1;
        }
        //最后一行,无法到达下方,是特殊情况2
        for (int i = bx; i >= 0; i--) {
            if (dp[i][by] == -1) break;
            dp[i][by] = 1;
        }
        
        for (int j = by - 1; j >= 0; j--) {
            for (int i = bx - 1; i >= 0; i--) {
               // 已经置-1的地方直接跳过
                if (dp[i][j] == -1){
                    continue;
                }
                //右和下都是-1,置0
                if (dp[i + 1][j] == -1 && dp[i][j + 1] == -1) {
                    dp[i][j] = 0;
                    continue;
                }
                //仅下为-1
                if (dp[i + 1][j] == -1) {
                    dp[i][j] = dp[i][j + 1];
                    continue;
                }
                //仅右为-1
                if (dp[i][j + 1] == -1) {
                    dp[i][j] = dp[i + 1][j];
                    continue;
                }
                //右和下都不为-1
                dp[i][j] = dp[i + 1][j] + dp[i][j + 1];
            }
        }
        return dp[0][0];
    }
}