Calculate the value of the function for smaller values first, then calculate for the next larger value, and so on.
For example, in this question, calculate in the sequence $f(1) \to f(2) \to f(3) \to f(4) \to f(5)$
If you try to calculate from top to bottom, you will end up evaluating the function for an exponential number of times.
So,
$f(1)=1$
$f(2)=2$
$f(3)=5$
$f(4)=15$
$f(5)=51$