https://codeforces.com/problemset/problem/348/A
Input Format
Check Link
Output Format
Check Link
Constraints
Check Link
Example
Input
3 3 2 2
Output
4
https://codeforces.com/problemset/problem/348/A
Check Link
Check Link
Check Link
3 3 2 2
4