eolymp
Competitions

Lesson 8. October 22 - 28. Recursive functions. Two dimentional arrays.

Function-10

The function is given with nonnegative integer arguments m and n (mn):

prb2999.gif

Find the value of the function.

Input

Two nonnegative integers n and m (0n, m20).

Output

Print the value of the function f(m, n).

Time limit 1 second
Memory limit 128 MiB
Input example #1
4 2
Output example #1
6