Fun function - 2
128 megabytes
Find the value of the function
f(x, y) = \begin{cases}
1, & \text{if } x \le 0 \text{ or } y \le 0 \\
f(x - 1, y) + f(x, y - 1) + 1, & \text{if } x \le y \\
f(x, y / 2) + 2, & \text{if } x > y
\end{cases}
Input
Two integers x, y (0 \leq x, y \leq 25).
Output
Print the value of the function f(x, y).