program main
implicit None
	integer::s,p,n
	
	read*,s
	
	p = 1
	do
		if(s == 4 .or. s == 1 .or. s ==2)then
			print "(i0)",p+3
			stop
		endif
		if(mod(s,2) == 0)then
			s = s/2
			else
			s = s*3+1
		endif
		p = p+1
	enddo
end program main