## DESCRIPTION 

Now please implement the function f. The function f will return the result of the operation. The function should return something in all cases. 
It should terminate within 30 seconds.
