Follow the algorithm.
Start with the number $40$40.
If the number is even, halve it. If the number is odd, subtract one and halve it.
Follow a mathematical algorithm involving branching and repetition (iteration)