Function Run Fun#2177

Function Run Fun

1 second
128 megabytes
Very easy

We all love recursion! Don't we?

Consider a three-parameter recursive function w(a, b, c):

prb2177.gif

This is the simplest implementation. The problem is, if implemented directly, even for small values of , , and (for example, a = 15, b = 15, c = 15), the program will take hours to run due to recursion.

Input

Each line contains three integers , , . The last line contains -1\ -1\ -1 and is not processed. For each input triple, you should calculate the value of w(a, b, c).

Output

For each triple, output the value of w(a, b, c).

Examples

Example 1

Loading
Loading