import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        //String str = sc.next();
        int N = sc.nextInt();
        int ans = 0;
        
        for(int i=1; i<=1000000; i++){
            if(N==4 || N==2 || N==1){
                ans = i+3;
                break;
            }else{
                N = f(N);
            }
        }
        System.out.println(ans);
    }
    
    public static int f(int n){
        if(n%2 == 0){
            n = n/2;
        }else{
            n = 3*n+1;
        }
        return n;
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        //String str = sc.next();
        int N = sc.nextInt();
        int ans = 0;
        
        for(int i=1; i<=1000000; i++){
            if(N==4 || N==2 || N==1){
                ans = i+3;
                break;
            }else{
                N = f(N);
            }
        }
        System.out.println(ans);
    }
    
    public static int f(int n){
        if(n%2 == 0){
            n = n/2;
        }else{
            n = 3*n+1;
        }
        return n;
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        //String str = sc.next();
        int N = sc.nextInt();
        int ans = 0;
        
        for(int i=1; i<=1000000; i++){
            if(N==4 || N==2 || N==1){
                ans = i+3;
                break;
            }else{
                N = f(N);
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        //String str = sc.next();
        int N = sc.nextInt();
        int ans = 0;
        
        for(int i=1; i<=1000000; i++){
            if(N==4 || N==2 || N==1){
                ans = i+3;
                break;
            }else{
                N = f(N);
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for(int i=1; i<=1000000; i++){
            if(N==4 || N==2 || N==1){
                ans = i+3;
                break;
            }else{
                N = f(N);
            }
        } int i=1; int i=1; i 1 i<=1000000 i 1000000 i++ i++ i {
            if(N==4 || N==2 || N==1){
                ans = i+3;
                break;
            }else{
                N = f(N);
            }
        } {
            if(N==4 || N==2 || N==1){
                ans = i+3;
                break;
            }else{
                N = f(N);
            }
        } if(N==4 || N==2 || N==1){
                ans = i+3;
                break;
            }else{
                N = f(N);
            } N==4 || N==2 || N==1 N==4 || N==2 || N==1 N==4 N 4 N==2 N 2 N==1 N 1 {
                ans = i+3;
                break;
            } ans = i+3 ans i+3 i 3 break; {
                N = f(N);
            } N = f(N) N f(N) f N System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static int f(int n){
        if(n%2 == 0){
            n = n/2;
        }else{
            n = 3*n+1;
        }
        return n;
    } f {
        if(n%2 == 0){
            n = n/2;
        }else{
            n = 3*n+1;
        }
        return n;
    } if(n%2 == 0){
            n = n/2;
        }else{
            n = 3*n+1;
        } n%2 == 0 n%2 n 2 0 {
            n = n/2;
        } n = n/2 n n/2 n 2 {
            n = 3*n+1;
        } n = 3*n+1 n 3*n+1 3*n 3 n 1 return n; n int n n public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        //String str = sc.next();
        int N = sc.nextInt();
        int ans = 0;
        
        for(int i=1; i<=1000000; i++){
            if(N==4 || N==2 || N==1){
                ans = i+3;
                break;
            }else{
                N = f(N);
            }
        }
        System.out.println(ans);
    }
    
    public static int f(int n){
        if(n%2 == 0){
            n = n/2;
        }else{
            n = 3*n+1;
        }
        return n;
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        //String str = sc.next();
        int N = sc.nextInt();
        int ans = 0;
        
        for(int i=1; i<=1000000; i++){
            if(N==4 || N==2 || N==1){
                ans = i+3;
                break;
            }else{
                N = f(N);
            }
        }
        System.out.println(ans);
    }
    
    public static int f(int n){
        if(n%2 == 0){
            n = n/2;
        }else{
            n = 3*n+1;
        }
        return n;
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        //String str = sc.next();
        int N = sc.nextInt();
        int ans = 0;
        
        for(int i=1; i<=1000000; i++){
            if(N==4 || N==2 || N==1){
                ans = i+3;
                break;
            }else{
                N = f(N);
            }
        }
        System.out.println(ans);
    }
    
    public static int f(int n){
        if(n%2 == 0){
            n = n/2;
        }else{
            n = 3*n+1;
        }
        return n;
    }
}