while nums = gets
	num = nums.to_i
	count = 0
	if num == 0
		break
	end
	while num != 1
	if (num % 2) == 0
			num = num / 2
			count = count + 1
		else 
			num = (num * 3) + 1
			count = count + 1
		end
	end
	puts count
end