Halve n when it is even, step it up or down by one when it is odd, and return the fewest moves that bring it to 1.