import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        int[] memo = new int[1000000];
        calc(S, 1, memo);
    }

    public static void calc(int s, int index, int[] memo) {
        
          if (s == 4 || s==2 || s==1) {
                System.out.println(index+3);
                return;
            }
       
		int result = 0;
        if (s % 2 == 0){
            result = s/2;
        }        
        else {
            result = s*3 + 1;
        }
        calc(result, index+1, memo);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        int[] memo = new int[1000000];
        calc(S, 1, memo);
    }

    public static void calc(int s, int index, int[] memo) {
        
          if (s == 4 || s==2 || s==1) {
                System.out.println(index+3);
                return;
            }
       
		int result = 0;
        if (s % 2 == 0){
            result = s/2;
        }        
        else {
            result = s*3 + 1;
        }
        calc(result, index+1, memo);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        int[] memo = new int[1000000];
        calc(S, 1, memo);
    } main {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        int[] memo = new int[1000000];
        calc(S, 1, memo);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int S = sc.nextInt(); S sc.nextInt() sc.nextInt sc int[] memo = new int[1000000]; memo new int[1000000] 1000000 calc(S, 1, memo) calc S 1 memo String[] args args public static void calc(int s, int index, int[] memo) {
        
          if (s == 4 || s==2 || s==1) {
                System.out.println(index+3);
                return;
            }
       
		int result = 0;
        if (s % 2 == 0){
            result = s/2;
        }        
        else {
            result = s*3 + 1;
        }
        calc(result, index+1, memo);
    } calc {
        
          if (s == 4 || s==2 || s==1) {
                System.out.println(index+3);
                return;
            }
       
		int result = 0;
        if (s % 2 == 0){
            result = s/2;
        }        
        else {
            result = s*3 + 1;
        }
        calc(result, index+1, memo);
    } if (s == 4 || s==2 || s==1) {
                System.out.println(index+3);
                return;
            } s == 4 || s==2 || s==1 s == 4 || s==2 || s==1 s == 4 s 4 s==2 s 2 s==1 s 1 {
                System.out.println(index+3);
                return;
            } System.out.println(index+3) System.out.println System.out System System.out index+3 index 3 return; int result = 0; result 0 if (s % 2 == 0){
            result = s/2;
        }        
        else {
            result = s*3 + 1;
        } s % 2 == 0 s % 2 s 2 0 {
            result = s/2;
        } result = s/2 result s/2 s 2 {
            result = s*3 + 1;
        } result = s*3 + 1 result s*3 + 1 s*3 s 3 1 calc(result, index+1, memo) calc result index+1 index 1 memo int s s int index index int[] memo memo public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        int[] memo = new int[1000000];
        calc(S, 1, memo);
    }

    public static void calc(int s, int index, int[] memo) {
        
          if (s == 4 || s==2 || s==1) {
                System.out.println(index+3);
                return;
            }
       
		int result = 0;
        if (s % 2 == 0){
            result = s/2;
        }        
        else {
            result = s*3 + 1;
        }
        calc(result, index+1, memo);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        int[] memo = new int[1000000];
        calc(S, 1, memo);
    }

    public static void calc(int s, int index, int[] memo) {
        
          if (s == 4 || s==2 || s==1) {
                System.out.println(index+3);
                return;
            }
       
		int result = 0;
        if (s % 2 == 0){
            result = s/2;
        }        
        else {
            result = s*3 + 1;
        }
        calc(result, index+1, memo);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        int[] memo = new int[1000000];
        calc(S, 1, memo);
    }

    public static void calc(int s, int index, int[] memo) {
        
          if (s == 4 || s==2 || s==1) {
                System.out.println(index+3);
                return;
            }
       
		int result = 0;
        if (s % 2 == 0){
            result = s/2;
        }        
        else {
            result = s*3 + 1;
        }
        calc(result, index+1, memo);
    }
}