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

count = 1
while true

	newa = 0
	count += 1
	if a.last.even?
		newa =  (a.last / 2)
	else
		newa =(a.last * 3 + 1)
	end
	unless a.include?(newa)
		a << newa
	else
		break
	end

end
puts count