Calculate the value of the function:
A natural number n is given (1 \le n \le 10^{18}).
Output f(n).
Example 1