import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int s = sc.nextInt();
	        int x = 0;
	        
        	List<Integer> list = new ArrayList<>();
	        
	        for(int i=2; i<1000000; i++) {
	         	list.add(s);
	        	if(s%2==0) {
	        		x = s/2;
	        	}else {
	        		x = 3*s+1;
	        	}
	        	s = x;
	        	if(list.contains(x)) {
	        		System.out.println(i);
	                break;
	            }
	        }
	}

} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int s = sc.nextInt();
	        int x = 0;
	        
        	List<Integer> list = new ArrayList<>();
	        
	        for(int i=2; i<1000000; i++) {
	         	list.add(s);
	        	if(s%2==0) {
	        		x = s/2;
	        	}else {
	        		x = 3*s+1;
	        	}
	        	s = x;
	        	if(list.contains(x)) {
	        		System.out.println(i);
	                break;
	            }
	        }
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int s = sc.nextInt();
	        int x = 0;
	        
        	List<Integer> list = new ArrayList<>();
	        
	        for(int i=2; i<1000000; i++) {
	         	list.add(s);
	        	if(s%2==0) {
	        		x = s/2;
	        	}else {
	        		x = 3*s+1;
	        	}
	        	s = x;
	        	if(list.contains(x)) {
	        		System.out.println(i);
	                break;
	            }
	        }
	} main {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int s = sc.nextInt();
	        int x = 0;
	        
        	List<Integer> list = new ArrayList<>();
	        
	        for(int i=2; i<1000000; i++) {
	         	list.add(s);
	        	if(s%2==0) {
	        		x = s/2;
	        	}else {
	        		x = 3*s+1;
	        	}
	        	s = x;
	        	if(list.contains(x)) {
	        		System.out.println(i);
	                break;
	            }
	        }
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int x = 0; x 0 List<Integer> list = new ArrayList<>(); list new ArrayList<>() for(int i=2; i<1000000; i++) {
	         	list.add(s);
	        	if(s%2==0) {
	        		x = s/2;
	        	}else {
	        		x = 3*s+1;
	        	}
	        	s = x;
	        	if(list.contains(x)) {
	        		System.out.println(i);
	                break;
	            }
	        } int i=2; int i=2; i 2 i<1000000 i 1000000 i++ i++ i {
	         	list.add(s);
	        	if(s%2==0) {
	        		x = s/2;
	        	}else {
	        		x = 3*s+1;
	        	}
	        	s = x;
	        	if(list.contains(x)) {
	        		System.out.println(i);
	                break;
	            }
	        } {
	         	list.add(s);
	        	if(s%2==0) {
	        		x = s/2;
	        	}else {
	        		x = 3*s+1;
	        	}
	        	s = x;
	        	if(list.contains(x)) {
	        		System.out.println(i);
	                break;
	            }
	        } list.add(s) list.add list s if(s%2==0) {
	        		x = s/2;
	        	}else {
	        		x = 3*s+1;
	        	} s%2==0 s%2 s 2 0 {
	        		x = s/2;
	        	} x = s/2 x s/2 s 2 {
	        		x = 3*s+1;
	        	} x = 3*s+1 x 3*s+1 3*s 3 s 1 s = x s x if(list.contains(x)) {
	        		System.out.println(i);
	                break;
	            } list.contains(x) list.contains list x {
	        		System.out.println(i);
	                break;
	            } System.out.println(i) System.out.println System.out System System.out i break; String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int s = sc.nextInt();
	        int x = 0;
	        
        	List<Integer> list = new ArrayList<>();
	        
	        for(int i=2; i<1000000; i++) {
	         	list.add(s);
	        	if(s%2==0) {
	        		x = s/2;
	        	}else {
	        		x = 3*s+1;
	        	}
	        	s = x;
	        	if(list.contains(x)) {
	        		System.out.println(i);
	                break;
	            }
	        }
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int s = sc.nextInt();
	        int x = 0;
	        
        	List<Integer> list = new ArrayList<>();
	        
	        for(int i=2; i<1000000; i++) {
	         	list.add(s);
	        	if(s%2==0) {
	        		x = s/2;
	        	}else {
	        		x = 3*s+1;
	        	}
	        	s = x;
	        	if(list.contains(x)) {
	        		System.out.println(i);
	                break;
	            }
	        }
	}

} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int s = sc.nextInt();
	        int x = 0;
	        
        	List<Integer> list = new ArrayList<>();
	        
	        for(int i=2; i<1000000; i++) {
	         	list.add(s);
	        	if(s%2==0) {
	        		x = s/2;
	        	}else {
	        		x = 3*s+1;
	        	}
	        	s = x;
	        	if(list.contains(x)) {
	        		System.out.println(i);
	                break;
	            }
	        }
	}

}
