Square the number (multiply by the same number)

 

Continue ...

If the number is less than 5, add 5. Otherwise subtract 4.

 

Continue ...