e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

MAP data structure

Recursive function 1

Find the value of the function:

prb10296.gif

Input

One positive integer n (1n1018).

Output

Print the value of f(n).

Time limit 1 second
Memory limit 128 MiB
Input example #1
5
Output example #1
5
Author Michael Medvediev