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[] f = new int[10000];
        
        f[0] = s;
        
        for(int i=1; i<10000; i++){
            if(f[i-1]%2==0){
                f[i]=f[i-1]/2;
            }else{
                f[i]=3*f[i-1]+1;
            }
            for(int j=0; j<i; j++){
                if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                }
            }
        }
        
        
        
	}
} 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[] f = new int[10000];
        
        f[0] = s;
        
        for(int i=1; i<10000; i++){
            if(f[i-1]%2==0){
                f[i]=f[i-1]/2;
            }else{
                f[i]=3*f[i-1]+1;
            }
            for(int j=0; j<i; j++){
                if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                }
            }
        }
        
        
        
	}
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int s= sc.nextInt();
        int[] f = new int[10000];
        
        f[0] = s;
        
        for(int i=1; i<10000; i++){
            if(f[i-1]%2==0){
                f[i]=f[i-1]/2;
            }else{
                f[i]=3*f[i-1]+1;
            }
            for(int j=0; j<i; j++){
                if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                }
            }
        }
        
        
        
	} main {
        Scanner sc = new Scanner(System.in);
        
        int s= sc.nextInt();
        int[] f = new int[10000];
        
        f[0] = s;
        
        for(int i=1; i<10000; i++){
            if(f[i-1]%2==0){
                f[i]=f[i-1]/2;
            }else{
                f[i]=3*f[i-1]+1;
            }
            for(int j=0; j<i; j++){
                if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                }
            }
        }
        
        
        
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s= sc.nextInt(); s sc.nextInt() sc.nextInt sc int[] f = new int[10000]; f new int[10000] 10000 f[0] = s f[0] f 0 s for(int i=1; i<10000; i++){
            if(f[i-1]%2==0){
                f[i]=f[i-1]/2;
            }else{
                f[i]=3*f[i-1]+1;
            }
            for(int j=0; j<i; j++){
                if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                }
            }
        } int i=1; int i=1; i 1 i<10000 i 10000 i++ i++ i {
            if(f[i-1]%2==0){
                f[i]=f[i-1]/2;
            }else{
                f[i]=3*f[i-1]+1;
            }
            for(int j=0; j<i; j++){
                if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                }
            }
        } {
            if(f[i-1]%2==0){
                f[i]=f[i-1]/2;
            }else{
                f[i]=3*f[i-1]+1;
            }
            for(int j=0; j<i; j++){
                if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                }
            }
        } if(f[i-1]%2==0){
                f[i]=f[i-1]/2;
            }else{
                f[i]=3*f[i-1]+1;
            } f[i-1]%2==0 f[i-1]%2 f[i-1] f i-1 i 1 2 0 {
                f[i]=f[i-1]/2;
            } f[i]=f[i-1]/2 f[i] f i f[i-1]/2 f[i-1] f i-1 i 1 2 {
                f[i]=3*f[i-1]+1;
            } f[i]=3*f[i-1]+1 f[i] f i 3*f[i-1]+1 3*f[i-1] 3 f[i-1] f i-1 i 1 1 for(int j=0; j<i; j++){
                if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                }
            } int j=0; int j=0; j 0 j<i j i j++ j++ j {
                if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                }
            } {
                if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                }
            } if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                } f[i]==f[j] f[i] f i f[j] f j {
                    System.out.println(i+1);
                    return;
                } System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 return; 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[] f = new int[10000];
        
        f[0] = s;
        
        for(int i=1; i<10000; i++){
            if(f[i-1]%2==0){
                f[i]=f[i-1]/2;
            }else{
                f[i]=3*f[i-1]+1;
            }
            for(int j=0; j<i; j++){
                if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                }
            }
        }
        
        
        
	}
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int s= sc.nextInt();
        int[] f = new int[10000];
        
        f[0] = s;
        
        for(int i=1; i<10000; i++){
            if(f[i-1]%2==0){
                f[i]=f[i-1]/2;
            }else{
                f[i]=3*f[i-1]+1;
            }
            for(int j=0; j<i; j++){
                if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                }
            }
        }
        
        
        
	}
} 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[] f = new int[10000];
        
        f[0] = s;
        
        for(int i=1; i<10000; i++){
            if(f[i-1]%2==0){
                f[i]=f[i-1]/2;
            }else{
                f[i]=3*f[i-1]+1;
            }
            for(int j=0; j<i; j++){
                if(f[i]==f[j]){
                    System.out.println(i+1);
                    return;
                }
            }
        }
        
        
        
	}
}