Problem F
Last Minute

Oh no! Chalmers Challenge is only one day away and Chalmers Coding Club haven’t had the time to prepare all tasks. As we all know, competitive programming problems are created by combining funny problem statements with computer programming methods. There are $A_{uniq}+A_{reuse}$ problem statement themes and $B_{uniq}+B_{reuse}$ algorithmic methods. Some of these are one-trick ponies that only work once while others are so good they never get old. Out of all the themes and methods, only $A_{reuse}$ and $B_{reuse}$ are good enough to be reused continually. How many different problems can be created by combining all these themes and methods?


Input consists of one line with four space-separated integers: $0 \le A_{uniq}, B_{uniq}, A_{reuse}, B_{reuse} \le 10^9$, the number of single-use themes and methods and the number of reusable themes and methods respectively.


Output a single integer, the number of problems that can be created in total.

Sample Input 1 Sample Output 1
2 3 0 0
Sample Input 2 Sample Output 2
7 3 0 3
Sample Input 3 Sample Output 3
82 31 21 44
Sample Input 4 Sample Output 4
0 2 1 0

Please log in to submit a solution to this problem

Log in