s = gets.to_i

temp = s
memo = {s => true}

(1..1000000).each{ |i|
	if temp % 2 == 0 then
		temp = temp / 2
	else
		temp = temp * 3 + 1
	end
	
	if memo[temp] != nil then
		puts i + 1
		exit
	else
		memo[temp] = true
	end
}