while num_s = gets
	count = 0
	num = num_s.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