Recursive Function - 1#343

Recursive Function - 1

1 second
128 megabytes
Medium (≈1350)

Calculate the value of the function:

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

Input

A natural number is given (1 \le n \le 10^{18}).

Output

Output .

Examples

Example 1

Loading
Loading