import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc =new Scanner(System.in);
        int S = sc.nextInt();        
        int[] num = new int[1000000];
        int ans = 0;
        num[0] = S;

        //計算処理          
        for(int i = 1; i <1000000; i++){
           if(S % 2 == 0){
               num[i] = S/2;
               S = S/2;
           }else if(S % 2 == 1){
               num[i] = 3*S + 1;
               S = 3*S + 1;
           }

            //評価
           for(int j = 0; j < i; j++){
               if(num[j] == num[i]){
                   ans = i+1;
               }
            }

            if(ans != 0){
                break;
            }
       }
       
       System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc =new Scanner(System.in);
        int S = sc.nextInt();        
        int[] num = new int[1000000];
        int ans = 0;
        num[0] = S;

        //計算処理          
        for(int i = 1; i <1000000; i++){
           if(S % 2 == 0){
               num[i] = S/2;
               S = S/2;
           }else if(S % 2 == 1){
               num[i] = 3*S + 1;
               S = 3*S + 1;
           }

            //評価
           for(int j = 0; j < i; j++){
               if(num[j] == num[i]){
                   ans = i+1;
               }
            }

            if(ans != 0){
                break;
            }
       }
       
       System.out.println(ans);
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc =new Scanner(System.in);
        int S = sc.nextInt();        
        int[] num = new int[1000000];
        int ans = 0;
        num[0] = S;

        //計算処理          
        for(int i = 1; i <1000000; i++){
           if(S % 2 == 0){
               num[i] = S/2;
               S = S/2;
           }else if(S % 2 == 1){
               num[i] = 3*S + 1;
               S = 3*S + 1;
           }

            //評価
           for(int j = 0; j < i; j++){
               if(num[j] == num[i]){
                   ans = i+1;
               }
            }

            if(ans != 0){
                break;
            }
       }
       
       System.out.println(ans);
    } main {
        
        Scanner sc =new Scanner(System.in);
        int S = sc.nextInt();        
        int[] num = new int[1000000];
        int ans = 0;
        num[0] = S;

        //計算処理          
        for(int i = 1; i <1000000; i++){
           if(S % 2 == 0){
               num[i] = S/2;
               S = S/2;
           }else if(S % 2 == 1){
               num[i] = 3*S + 1;
               S = 3*S + 1;
           }

            //評価
           for(int j = 0; j < i; j++){
               if(num[j] == num[i]){
                   ans = i+1;
               }
            }

            if(ans != 0){
                break;
            }
       }
       
       System.out.println(ans);
    } Scanner sc =new Scanner(System.in); sc new Scanner(System.in) int S = sc.nextInt(); S sc.nextInt() sc.nextInt sc int[] num = new int[1000000]; num new int[1000000] 1000000 int ans = 0; ans 0 num[0] = S num[0] num 0 S for(int i = 1; i <1000000; i++){
           if(S % 2 == 0){
               num[i] = S/2;
               S = S/2;
           }else if(S % 2 == 1){
               num[i] = 3*S + 1;
               S = 3*S + 1;
           }

            //評価
           for(int j = 0; j < i; j++){
               if(num[j] == num[i]){
                   ans = i+1;
               }
            }

            if(ans != 0){
                break;
            }
       } int i = 1; int i = 1; i 1 i <1000000 i 1000000 i++ i++ i {
           if(S % 2 == 0){
               num[i] = S/2;
               S = S/2;
           }else if(S % 2 == 1){
               num[i] = 3*S + 1;
               S = 3*S + 1;
           }

            //評価
           for(int j = 0; j < i; j++){
               if(num[j] == num[i]){
                   ans = i+1;
               }
            }

            if(ans != 0){
                break;
            }
       } {
           if(S % 2 == 0){
               num[i] = S/2;
               S = S/2;
           }else if(S % 2 == 1){
               num[i] = 3*S + 1;
               S = 3*S + 1;
           }

            //評価
           for(int j = 0; j < i; j++){
               if(num[j] == num[i]){
                   ans = i+1;
               }
            }

            if(ans != 0){
                break;
            }
       } if(S % 2 == 0){
               num[i] = S/2;
               S = S/2;
           }else if(S % 2 == 1){
               num[i] = 3*S + 1;
               S = 3*S + 1;
           } S % 2 == 0 S % 2 S 2 0 {
               num[i] = S/2;
               S = S/2;
           } num[i] = S/2 num[i] num i S/2 S 2 S = S/2 S S/2 S 2 if(S % 2 == 1){
               num[i] = 3*S + 1;
               S = 3*S + 1;
           } S % 2 == 1 S % 2 S 2 1 {
               num[i] = 3*S + 1;
               S = 3*S + 1;
           } num[i] = 3*S + 1 num[i] num i 3*S + 1 3*S 3 S 1 S = 3*S + 1 S 3*S + 1 3*S 3 S 1 for(int j = 0; j < i; j++){
               if(num[j] == num[i]){
                   ans = i+1;
               }
            } int j = 0; int j = 0; j 0 j < i j i j++ j++ j {
               if(num[j] == num[i]){
                   ans = i+1;
               }
            } {
               if(num[j] == num[i]){
                   ans = i+1;
               }
            } if(num[j] == num[i]){
                   ans = i+1;
               } num[j] == num[i] num[j] num j num[i] num i {
                   ans = i+1;
               } ans = i+1 ans i+1 i 1 if(ans != 0){
                break;
            } ans != 0 ans 0 {
                break;
            } break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc =new Scanner(System.in);
        int S = sc.nextInt();        
        int[] num = new int[1000000];
        int ans = 0;
        num[0] = S;

        //計算処理          
        for(int i = 1; i <1000000; i++){
           if(S % 2 == 0){
               num[i] = S/2;
               S = S/2;
           }else if(S % 2 == 1){
               num[i] = 3*S + 1;
               S = 3*S + 1;
           }

            //評価
           for(int j = 0; j < i; j++){
               if(num[j] == num[i]){
                   ans = i+1;
               }
            }

            if(ans != 0){
                break;
            }
       }
       
       System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc =new Scanner(System.in);
        int S = sc.nextInt();        
        int[] num = new int[1000000];
        int ans = 0;
        num[0] = S;

        //計算処理          
        for(int i = 1; i <1000000; i++){
           if(S % 2 == 0){
               num[i] = S/2;
               S = S/2;
           }else if(S % 2 == 1){
               num[i] = 3*S + 1;
               S = 3*S + 1;
           }

            //評価
           for(int j = 0; j < i; j++){
               if(num[j] == num[i]){
                   ans = i+1;
               }
            }

            if(ans != 0){
                break;
            }
       }
       
       System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc =new Scanner(System.in);
        int S = sc.nextInt();        
        int[] num = new int[1000000];
        int ans = 0;
        num[0] = S;

        //計算処理          
        for(int i = 1; i <1000000; i++){
           if(S % 2 == 0){
               num[i] = S/2;
               S = S/2;
           }else if(S % 2 == 1){
               num[i] = 3*S + 1;
               S = 3*S + 1;
           }

            //評価
           for(int j = 0; j < i; j++){
               if(num[j] == num[i]){
                   ans = i+1;
               }
            }

            if(ans != 0){
                break;
            }
       }
       
       System.out.println(ans);
    }
}
