import java.util.*;
 
public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
        int count = 1;
        if(n == 1 || n == 2){
        	System.out.println("4");
            return;
        }
        while(n != 4){
        	if(n % 2 == 0){
            	n = n / 2;
            }else{
            	n = n * 3 + 1;
            }
            count++;
        }
        System.out.println(count + 3);
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
        int count = 1;
        if(n == 1 || n == 2){
        	System.out.println("4");
            return;
        }
        while(n != 4){
        	if(n % 2 == 0){
            	n = n / 2;
            }else{
            	n = n * 3 + 1;
            }
            count++;
        }
        System.out.println(count + 3);
    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
        int count = 1;
        if(n == 1 || n == 2){
        	System.out.println("4");
            return;
        }
        while(n != 4){
        	if(n % 2 == 0){
            	n = n / 2;
            }else{
            	n = n * 3 + 1;
            }
            count++;
        }
        System.out.println(count + 3);
    } main {
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
        int count = 1;
        if(n == 1 || n == 2){
        	System.out.println("4");
            return;
        }
        while(n != 4){
        	if(n % 2 == 0){
            	n = n / 2;
            }else{
            	n = n * 3 + 1;
            }
            count++;
        }
        System.out.println(count + 3);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int count = 1; count 1 if(n == 1 || n == 2){
        	System.out.println("4");
            return;
        } n == 1 || n == 2 n == 1 n 1 n == 2 n 2 {
        	System.out.println("4");
            return;
        } System.out.println("4") System.out.println System.out System System.out "4" return; while(n != 4){
        	if(n % 2 == 0){
            	n = n / 2;
            }else{
            	n = n * 3 + 1;
            }
            count++;
        } n != 4 n 4 {
        	if(n % 2 == 0){
            	n = n / 2;
            }else{
            	n = n * 3 + 1;
            }
            count++;
        } if(n % 2 == 0){
            	n = n / 2;
            }else{
            	n = n * 3 + 1;
            } n % 2 == 0 n % 2 n 2 0 {
            	n = n / 2;
            } n = n / 2 n n / 2 n 2 {
            	n = n * 3 + 1;
            } n = n * 3 + 1 n n * 3 + 1 n * 3 n 3 1 count++ count System.out.println(count + 3) System.out.println System.out System System.out count + 3 count 3 String[] args args public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
        int count = 1;
        if(n == 1 || n == 2){
        	System.out.println("4");
            return;
        }
        while(n != 4){
        	if(n % 2 == 0){
            	n = n / 2;
            }else{
            	n = n * 3 + 1;
            }
            count++;
        }
        System.out.println(count + 3);
    }
} public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
        int count = 1;
        if(n == 1 || n == 2){
        	System.out.println("4");
            return;
        }
        while(n != 4){
        	if(n % 2 == 0){
            	n = n / 2;
            }else{
            	n = n * 3 + 1;
            }
            count++;
        }
        System.out.println(count + 3);
    }
} Main
import java.util.*;
 
public class Main {
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
        int count = 1;
        if(n == 1 || n == 2){
        	System.out.println("4");
            return;
        }
        while(n != 4){
        	if(n % 2 == 0){
            	n = n / 2;
            }else{
            	n = n * 3 + 1;
            }
            count++;
        }
        System.out.println(count + 3);
    }
}