Microoptimized version of problem 14-collatz