Recursive function 1
128 megabytes
Find the value of the function:
f(n) = \begin{cases}
1, & n = 0 \\
f\left(\left\lfloor \frac{n}{2} \right\rfloor\right) + f\left(\left\lfloor \frac{n}{3} \right\rfloor\right), & n > 0
\end{cases}
Input
One positive integer n (1 \leq n \leq 10^{18}).
Output
Print the value of f(n).