while nums = gets
	if nums == nil
		break
	end	
	count = 0
	num = nums.to_i
	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