Implement the recursive function:
An integer n~(0 \le n \le 1000).
Output the value of the function f(n).
Example 1