Problems
Fun function - 2
Fun function - 2
Find the value of the function
f(x, y) = \begin{cases}
1, x \le 0~or~y \le 0 \\
f(x - 1, y) + f(x, y - 1) + 1, x \le y \\
f(x, y / 2) + 2, x > y
\end{cases}
Input data
Two integers x, y~(0 \le x, y \le 25).
Output data
Print the value of the function f(x, y).
Examples
Input example #1
2 3
Output example #1
17