Collatz Conjecture (OEIS A006577) This is the Collatz Conjecture (OEIS A006577):


Start with an integer n > 1. 
Repeat the following steps:


If n is even, divide it by 2. 
If n is odd, multiply it by 3 and add 1. 



It is proven that for all positive integers up to 5 * 260, or about 5764000000000000000, n will eventually become 1.

Your task is to find out how many iterations it takes (of halving or tripling-plus-one) to reach 1.

Relevant xkcd :)

Rules:


Shortest code wins. 
If a number &lt; 2 is input, or a non-integer, or a non-number, output does not matter. 


Test cases

2  -&gt; 1
16 -&gt; 4
5  -&gt; 5
7  -&gt; 16
GolfScript, 24 23 21 20 18 chars

~{(}{3*).2%6\?/}/,


Assumes input on stdin. Online test