Collatz ------- Consider the following algorithm: Collatz(int n) { m = n while (m != 1) { if (m is odd) then m = 3 * m + 1 else m = m / 2 } } Nobody knows whether this algorithm terminates for all possible positive integers n. However, people have checked that it does terminate for all values of n up to 5 764 000 000 000 000 000. Given a value of n, you must determine how many iterations of the loop are performed. You may assume that the value of m will always fit into a Java int. Input ----- There will be multiple input instance. Each line of input will contain a single positive integer. The end of the input will be indicated by a line containing 0. (You should not produce any output for the line that contains 0.) Output ------ For each positive integer n in the input, output the number of iterations that the algorithm above performs when given the input value n. Sample Input ------------ 1 4 27 0 Sample Output ------------- 0 2 111