import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int s = scn.nextInt();
    	int count = 0;
    	int count2 = 0;
    	if(s==1){
        	count = count - 1;
        }
    	if(s==2){
        	count = count - 2;
        }
    	while(count2<2){
      		count = count + 1;
      		if(s==4){
            	count2 = count2 + 1;
            }
			if(s%2==0){
            	s = s/2;
            }else{
             	s = s*3 + 1;
            }
   		 }
    
    	System.out.println(count);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int s = scn.nextInt();
    	int count = 0;
    	int count2 = 0;
    	if(s==1){
        	count = count - 1;
        }
    	if(s==2){
        	count = count - 2;
        }
    	while(count2<2){
      		count = count + 1;
      		if(s==4){
            	count2 = count2 + 1;
            }
			if(s%2==0){
            	s = s/2;
            }else{
             	s = s*3 + 1;
            }
   		 }
    
    	System.out.println(count);
	}
} Main public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int s = scn.nextInt();
    	int count = 0;
    	int count2 = 0;
    	if(s==1){
        	count = count - 1;
        }
    	if(s==2){
        	count = count - 2;
        }
    	while(count2<2){
      		count = count + 1;
      		if(s==4){
            	count2 = count2 + 1;
            }
			if(s%2==0){
            	s = s/2;
            }else{
             	s = s*3 + 1;
            }
   		 }
    
    	System.out.println(count);
	} main {
		Scanner scn = new Scanner(System.in);
		int s = scn.nextInt();
    	int count = 0;
    	int count2 = 0;
    	if(s==1){
        	count = count - 1;
        }
    	if(s==2){
        	count = count - 2;
        }
    	while(count2<2){
      		count = count + 1;
      		if(s==4){
            	count2 = count2 + 1;
            }
			if(s%2==0){
            	s = s/2;
            }else{
             	s = s*3 + 1;
            }
   		 }
    
    	System.out.println(count);
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int s = scn.nextInt(); s scn.nextInt() scn.nextInt scn int count = 0; count 0 int count2 = 0; count2 0 if(s==1){
        	count = count - 1;
        } s==1 s 1 {
        	count = count - 1;
        } count = count - 1 count count - 1 count 1 if(s==2){
        	count = count - 2;
        } s==2 s 2 {
        	count = count - 2;
        } count = count - 2 count count - 2 count 2 while(count2<2){
      		count = count + 1;
      		if(s==4){
            	count2 = count2 + 1;
            }
			if(s%2==0){
            	s = s/2;
            }else{
             	s = s*3 + 1;
            }
   		 } count2<2 count2 2 {
      		count = count + 1;
      		if(s==4){
            	count2 = count2 + 1;
            }
			if(s%2==0){
            	s = s/2;
            }else{
             	s = s*3 + 1;
            }
   		 } count = count + 1 count count + 1 count 1 if(s==4){
            	count2 = count2 + 1;
            } s==4 s 4 {
            	count2 = count2 + 1;
            } count2 = count2 + 1 count2 count2 + 1 count2 1 if(s%2==0){
            	s = s/2;
            }else{
             	s = s*3 + 1;
            } s%2==0 s%2 s 2 0 {
            	s = s/2;
            } s = s/2 s s/2 s 2 {
             	s = s*3 + 1;
            } s = s*3 + 1 s s*3 + 1 s*3 s 3 1 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int s = scn.nextInt();
    	int count = 0;
    	int count2 = 0;
    	if(s==1){
        	count = count - 1;
        }
    	if(s==2){
        	count = count - 2;
        }
    	while(count2<2){
      		count = count + 1;
      		if(s==4){
            	count2 = count2 + 1;
            }
			if(s%2==0){
            	s = s/2;
            }else{
             	s = s*3 + 1;
            }
   		 }
    
    	System.out.println(count);
	}
} public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int s = scn.nextInt();
    	int count = 0;
    	int count2 = 0;
    	if(s==1){
        	count = count - 1;
        }
    	if(s==2){
        	count = count - 2;
        }
    	while(count2<2){
      		count = count + 1;
      		if(s==4){
            	count2 = count2 + 1;
            }
			if(s%2==0){
            	s = s/2;
            }else{
             	s = s*3 + 1;
            }
   		 }
    
    	System.out.println(count);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int s = scn.nextInt();
    	int count = 0;
    	int count2 = 0;
    	if(s==1){
        	count = count - 1;
        }
    	if(s==2){
        	count = count - 2;
        }
    	while(count2<2){
      		count = count + 1;
      		if(s==4){
            	count2 = count2 + 1;
            }
			if(s%2==0){
            	s = s/2;
            }else{
             	s = s*3 + 1;
            }
   		 }
    
    	System.out.println(count);
	}
}
