import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	sc.close();
    	int ans = 1;
    	if(N == 1 || N == 2 || N == 4){
    		System.out.println(4);
    		System.exit(0);
    	}
    	while(true){
    		if(N % 2 == 0){
    			N = N / 2;
    			ans++;
    		}else{
    			N = N * 3 + 1;
    			ans++;
    		}
    		if(N == 4) break;
    	}
    	System.out.println(ans + 3);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	sc.close();
    	int ans = 1;
    	if(N == 1 || N == 2 || N == 4){
    		System.out.println(4);
    		System.exit(0);
    	}
    	while(true){
    		if(N % 2 == 0){
    			N = N / 2;
    			ans++;
    		}else{
    			N = N * 3 + 1;
    			ans++;
    		}
    		if(N == 4) break;
    	}
    	System.out.println(ans + 3);
    }
} Main public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	sc.close();
    	int ans = 1;
    	if(N == 1 || N == 2 || N == 4){
    		System.out.println(4);
    		System.exit(0);
    	}
    	while(true){
    		if(N % 2 == 0){
    			N = N / 2;
    			ans++;
    		}else{
    			N = N * 3 + 1;
    			ans++;
    		}
    		if(N == 4) break;
    	}
    	System.out.println(ans + 3);
    } main {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	sc.close();
    	int ans = 1;
    	if(N == 1 || N == 2 || N == 4){
    		System.out.println(4);
    		System.exit(0);
    	}
    	while(true){
    		if(N % 2 == 0){
    			N = N / 2;
    			ans++;
    		}else{
    			N = N * 3 + 1;
    			ans++;
    		}
    		if(N == 4) break;
    	}
    	System.out.println(ans + 3);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc sc.close() sc.close sc int ans = 1; ans 1 if(N == 1 || N == 2 || N == 4){
    		System.out.println(4);
    		System.exit(0);
    	} N == 1 || N == 2 || N == 4 N == 1 || N == 2 || N == 4 N == 1 N 1 N == 2 N 2 N == 4 N 4 {
    		System.out.println(4);
    		System.exit(0);
    	} System.out.println(4) System.out.println System.out System System.out 4 System.exit(0) System.exit System 0 while(true){
    		if(N % 2 == 0){
    			N = N / 2;
    			ans++;
    		}else{
    			N = N * 3 + 1;
    			ans++;
    		}
    		if(N == 4) break;
    	} true {
    		if(N % 2 == 0){
    			N = N / 2;
    			ans++;
    		}else{
    			N = N * 3 + 1;
    			ans++;
    		}
    		if(N == 4) break;
    	} if(N % 2 == 0){
    			N = N / 2;
    			ans++;
    		}else{
    			N = N * 3 + 1;
    			ans++;
    		} N % 2 == 0 N % 2 N 2 0 {
    			N = N / 2;
    			ans++;
    		} N = N / 2 N N / 2 N 2 ans++ ans {
    			N = N * 3 + 1;
    			ans++;
    		} N = N * 3 + 1 N N * 3 + 1 N * 3 N 3 1 ans++ ans if(N == 4) break; N == 4 N 4 break; System.out.println(ans + 3) System.out.println System.out System System.out ans + 3 ans 3 String[] args args public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	sc.close();
    	int ans = 1;
    	if(N == 1 || N == 2 || N == 4){
    		System.out.println(4);
    		System.exit(0);
    	}
    	while(true){
    		if(N % 2 == 0){
    			N = N / 2;
    			ans++;
    		}else{
    			N = N * 3 + 1;
    			ans++;
    		}
    		if(N == 4) break;
    	}
    	System.out.println(ans + 3);
    }
} public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	sc.close();
    	int ans = 1;
    	if(N == 1 || N == 2 || N == 4){
    		System.out.println(4);
    		System.exit(0);
    	}
    	while(true){
    		if(N % 2 == 0){
    			N = N / 2;
    			ans++;
    		}else{
    			N = N * 3 + 1;
    			ans++;
    		}
    		if(N == 4) break;
    	}
    	System.out.println(ans + 3);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	sc.close();
    	int ans = 1;
    	if(N == 1 || N == 2 || N == 4){
    		System.out.println(4);
    		System.exit(0);
    	}
    	while(true){
    		if(N % 2 == 0){
    			N = N / 2;
    			ans++;
    		}else{
    			N = N * 3 + 1;
    			ans++;
    		}
    		if(N == 4) break;
    	}
    	System.out.println(ans + 3);
    }
}