S = gets.to_i
a =[]
a << S

count = 0
while true

	newa = 0

	if a.last.even?
		newa =  (a.last / 2)
	else
		newa =(a.last * 3 + 1)
	end
	if newa != a.min
		a << newa
	else
		break
	end
	count += 1
end
puts count