eolymp
bolt
Try our new interface for solving problems
Problems

Recursive function 1

Recursive function 1

Find the value of the function: $$ f(n) = \begin{cases} 1, n = 0 \\ f(n/2) + f(n/3), n > 0 \end{cases} $$ \InputFile One positive integer $n~(1 \le n \le 10^{18})$. \OutputFile 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