object Main extends App {
	var s = scala.io.StdIn.readInt

	def test(n: Int): Int = {
		if(n%2 == 0) n/2
		else 3*n + 1
	}

	var hit = Set[Int]()
	var ans = 1

	while(! hit(s)){
		hit += s
		s = test(s)
		ans += 1
	}

	println(ans)


}

