Collatz Conjecture
The Collatz conjecture which is also known as the conjecture is a very well known and old conjecture in mathematics. The conjecture is as follows. Take any natural number . If n is even, divided by two to get and if is odd number greater than , triple it and add one to obtain . Repeat this process to get a sequence of natural numbers known as the Hailstone sequence. The conjecture is that no matter what number you start, you always reach .
The hailstone sequence for is . Paul Erdos said "Mathematics is not yet ripe for such problems" and offered $500 for its solution. Now it lsquo;s time to show Erdos that the Collatz conjecture can be proved for small numbers in <sup>th</sup> Iran Internet Programming Contest. You are to write a program that computes the length of the Hailstone sequence for the given .
Input
There are multiple test cases in the input. Each test case consists of a line containing a non-negative integers . The input terminates with which should not be processed.
Output
For each test case, output the length of the Hailstone sequence in one line.