function f(n) {
	if (n % 2 == 0) {
		return n / 2;
	} else {
		return 3 * n + 1;
	}
}

function main(arg) {
	var tmp = Number(arg.split("\n")[0])
	var arr = []

	for(i = 0; i < 1000; i++) {
		if (i === 0) {
			arr.push(tmp)
			continue
		}

		var ai = f(arr[i - 1]);

		if (arr.indexOf(ai) >= 0) {
			break
		}
		arr.push(ai)
 	}

	 console.log(arr.length + 1)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));