import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int answer=1;
        List<Integer> list = new ArrayList<>();
        boolean returnFlag=false;
        
        list.add(a);
        answer+=1;
        if(a%2!=0){
            a=3*a+1;
        }else{
            a=a/2;
        }

        if(list.contains(a)){
            System.out.println(answer);
            return;
        }
        
        while(!returnFlag){
            list.add(a);
            answer+=1;
            if(a%2!=0){
                //奇数の時
                a=3*a+1;
                
            }else{
                a=a/2;
            }

            if(list.contains(a)){
                System.out.println(answer);
                return;
            }
        }    
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int answer=1;
        List<Integer> list = new ArrayList<>();
        boolean returnFlag=false;
        
        list.add(a);
        answer+=1;
        if(a%2!=0){
            a=3*a+1;
        }else{
            a=a/2;
        }

        if(list.contains(a)){
            System.out.println(answer);
            return;
        }
        
        while(!returnFlag){
            list.add(a);
            answer+=1;
            if(a%2!=0){
                //奇数の時
                a=3*a+1;
                
            }else{
                a=a/2;
            }

            if(list.contains(a)){
                System.out.println(answer);
                return;
            }
        }    
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int answer=1;
        List<Integer> list = new ArrayList<>();
        boolean returnFlag=false;
        
        list.add(a);
        answer+=1;
        if(a%2!=0){
            a=3*a+1;
        }else{
            a=a/2;
        }

        if(list.contains(a)){
            System.out.println(answer);
            return;
        }
        
        while(!returnFlag){
            list.add(a);
            answer+=1;
            if(a%2!=0){
                //奇数の時
                a=3*a+1;
                
            }else{
                a=a/2;
            }

            if(list.contains(a)){
                System.out.println(answer);
                return;
            }
        }    
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int answer=1;
        List<Integer> list = new ArrayList<>();
        boolean returnFlag=false;
        
        list.add(a);
        answer+=1;
        if(a%2!=0){
            a=3*a+1;
        }else{
            a=a/2;
        }

        if(list.contains(a)){
            System.out.println(answer);
            return;
        }
        
        while(!returnFlag){
            list.add(a);
            answer+=1;
            if(a%2!=0){
                //奇数の時
                a=3*a+1;
                
            }else{
                a=a/2;
            }

            if(list.contains(a)){
                System.out.println(answer);
                return;
            }
        }    
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int answer=1; answer 1 List<Integer> list = new ArrayList<>(); list new ArrayList<>() boolean returnFlag=false; returnFlag false list.add(a) list.add list a answer+=1 answer 1 if(a%2!=0){
            a=3*a+1;
        }else{
            a=a/2;
        } a%2!=0 a%2 a 2 0 {
            a=3*a+1;
        } a=3*a+1 a 3*a+1 3*a 3 a 1 {
            a=a/2;
        } a=a/2 a a/2 a 2 if(list.contains(a)){
            System.out.println(answer);
            return;
        } list.contains(a) list.contains list a {
            System.out.println(answer);
            return;
        } System.out.println(answer) System.out.println System.out System System.out answer return; while(!returnFlag){
            list.add(a);
            answer+=1;
            if(a%2!=0){
                //奇数の時
                a=3*a+1;
                
            }else{
                a=a/2;
            }

            if(list.contains(a)){
                System.out.println(answer);
                return;
            }
        } !returnFlag returnFlag {
            list.add(a);
            answer+=1;
            if(a%2!=0){
                //奇数の時
                a=3*a+1;
                
            }else{
                a=a/2;
            }

            if(list.contains(a)){
                System.out.println(answer);
                return;
            }
        } list.add(a) list.add list a answer+=1 answer 1 if(a%2!=0){
                //奇数の時
                a=3*a+1;
                
            }else{
                a=a/2;
            } a%2!=0 a%2 a 2 0 {
                //奇数の時
                a=3*a+1;
                
            } a=3*a+1 a 3*a+1 3*a 3 a 1 {
                a=a/2;
            } a=a/2 a a/2 a 2 if(list.contains(a)){
                System.out.println(answer);
                return;
            } list.contains(a) list.contains list a {
                System.out.println(answer);
                return;
            } System.out.println(answer) System.out.println System.out System System.out answer return; String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int answer=1;
        List<Integer> list = new ArrayList<>();
        boolean returnFlag=false;
        
        list.add(a);
        answer+=1;
        if(a%2!=0){
            a=3*a+1;
        }else{
            a=a/2;
        }

        if(list.contains(a)){
            System.out.println(answer);
            return;
        }
        
        while(!returnFlag){
            list.add(a);
            answer+=1;
            if(a%2!=0){
                //奇数の時
                a=3*a+1;
                
            }else{
                a=a/2;
            }

            if(list.contains(a)){
                System.out.println(answer);
                return;
            }
        }    
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int answer=1;
        List<Integer> list = new ArrayList<>();
        boolean returnFlag=false;
        
        list.add(a);
        answer+=1;
        if(a%2!=0){
            a=3*a+1;
        }else{
            a=a/2;
        }

        if(list.contains(a)){
            System.out.println(answer);
            return;
        }
        
        while(!returnFlag){
            list.add(a);
            answer+=1;
            if(a%2!=0){
                //奇数の時
                a=3*a+1;
                
            }else{
                a=a/2;
            }

            if(list.contains(a)){
                System.out.println(answer);
                return;
            }
        }    
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int answer=1;
        List<Integer> list = new ArrayList<>();
        boolean returnFlag=false;
        
        list.add(a);
        answer+=1;
        if(a%2!=0){
            a=3*a+1;
        }else{
            a=a/2;
        }

        if(list.contains(a)){
            System.out.println(answer);
            return;
        }
        
        while(!returnFlag){
            list.add(a);
            answer+=1;
            if(a%2!=0){
                //奇数の時
                a=3*a+1;
                
            }else{
                a=a/2;
            }

            if(list.contains(a)){
                System.out.println(answer);
                return;
            }
        }    
    }
}
