Fun function - 2#11297

Fun function - 2

1 second
128 megabytes
Easy

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 , (0 \leq x, y \leq 25).

Output

Print the value of the function f(x, y).

Examples

Example 1

Loading
Loading