Recursive function 1#10296

Recursive function 1

1 second
128 megabytes
Very easy

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 (1 \leq n \leq 10^{18}).

Output

Print the value of .

Examples

Example 1

Loading
Loading