eolymp
bolt
Try our new interface for solving problems
Problems

Save Walle

Save Walle

Robot Walle is located in the coordinate plane at $(0, 0)$. Calculate the number of ways in which the Walle can get to the position $(ex, ey)$ provided that the position $(x, y)$ can be reached only from the point $(x - 1, y)$ or $(x, y - 1)$, and must hold the conditions $x \ge y$ and $x \cdot y$ is even. \InputFile Two positive integers $ex, ey~(1 \le ex, ey \le 100)$. \OutputFile Print the number of ways modulo $10^9 + 7$.
Time limit 1 second
Memory limit 128 MiB
Input example #1
2 2
Output example #1
1
Input example #2
6 2
Output example #2
3
Input example #3
8 8
Output example #3
14
Source The 2012 All-Ukrainian Collegiate Programming Contest Round I Training Contest 19 April 2012