eolymp
bolt
Try our new interface for solving problems
Problems

Recursive function 1

Recursive function 1

Time limit 1 second
Memory limit 128 MiB

Find the value of the function:

f(n) = \begin{cases} 1, n = 0 \\ f(n/2) + f(n/3), n > 0 \end{cases}

Input data

One positive integer n~(1 \le n \le 10^{18}).

Output data

Print the value of f(n).

Examples

Input example #1
5
Output example #1
5
Author Michael Medvediev