import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int s=sc.nextInt();
		int[]a=new int [1000000];
		int Answer=0;
		a[0]=s;
		loop:for(int i=1;i<a.length;i++) {
			if(a[i-1]%2==0) {
				a[i]=a[i-1]/2;
			}
			else if(a[i-1]%2!=0) {
				a[i]=a[i-1]*3+1;
			}
			for(int j=0;j<i;j++) {
				if(a[i]==a[j]) {
					Answer=i;
					break loop;
				}
				
			}
		
		}
		System.out.println(Answer+1);
	
		sc.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int s=sc.nextInt();
		int[]a=new int [1000000];
		int Answer=0;
		a[0]=s;
		loop:for(int i=1;i<a.length;i++) {
			if(a[i-1]%2==0) {
				a[i]=a[i-1]/2;
			}
			else if(a[i-1]%2!=0) {
				a[i]=a[i-1]*3+1;
			}
			for(int j=0;j<i;j++) {
				if(a[i]==a[j]) {
					Answer=i;
					break loop;
				}
				
			}
		
		}
		System.out.println(Answer+1);
	
		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int s=sc.nextInt();
		int[]a=new int [1000000];
		int Answer=0;
		a[0]=s;
		loop:for(int i=1;i<a.length;i++) {
			if(a[i-1]%2==0) {
				a[i]=a[i-1]/2;
			}
			else if(a[i-1]%2!=0) {
				a[i]=a[i-1]*3+1;
			}
			for(int j=0;j<i;j++) {
				if(a[i]==a[j]) {
					Answer=i;
					break loop;
				}
				
			}
		
		}
		System.out.println(Answer+1);
	
		sc.close();
	} main {
		Scanner sc=new Scanner(System.in);
		int s=sc.nextInt();
		int[]a=new int [1000000];
		int Answer=0;
		a[0]=s;
		loop:for(int i=1;i<a.length;i++) {
			if(a[i-1]%2==0) {
				a[i]=a[i-1]/2;
			}
			else if(a[i-1]%2!=0) {
				a[i]=a[i-1]*3+1;
			}
			for(int j=0;j<i;j++) {
				if(a[i]==a[j]) {
					Answer=i;
					break loop;
				}
				
			}
		
		}
		System.out.println(Answer+1);
	
		sc.close();
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int s=sc.nextInt(); s sc.nextInt() sc.nextInt sc int[]a=new int [1000000]; a new int [1000000] 1000000 int Answer=0; Answer 0 a[0]=s a[0] a 0 s System.out.println(Answer+1) System.out.println System.out System System.out Answer+1 Answer 1 sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int s=sc.nextInt();
		int[]a=new int [1000000];
		int Answer=0;
		a[0]=s;
		loop:for(int i=1;i<a.length;i++) {
			if(a[i-1]%2==0) {
				a[i]=a[i-1]/2;
			}
			else if(a[i-1]%2!=0) {
				a[i]=a[i-1]*3+1;
			}
			for(int j=0;j<i;j++) {
				if(a[i]==a[j]) {
					Answer=i;
					break loop;
				}
				
			}
		
		}
		System.out.println(Answer+1);
	
		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int s=sc.nextInt();
		int[]a=new int [1000000];
		int Answer=0;
		a[0]=s;
		loop:for(int i=1;i<a.length;i++) {
			if(a[i-1]%2==0) {
				a[i]=a[i-1]/2;
			}
			else if(a[i-1]%2!=0) {
				a[i]=a[i-1]*3+1;
			}
			for(int j=0;j<i;j++) {
				if(a[i]==a[j]) {
					Answer=i;
					break loop;
				}
				
			}
		
		}
		System.out.println(Answer+1);
	
		sc.close();
	}

} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int s=sc.nextInt();
		int[]a=new int [1000000];
		int Answer=0;
		a[0]=s;
		loop:for(int i=1;i<a.length;i++) {
			if(a[i-1]%2==0) {
				a[i]=a[i-1]/2;
			}
			else if(a[i-1]%2!=0) {
				a[i]=a[i-1]*3+1;
			}
			for(int j=0;j<i;j++) {
				if(a[i]==a[j]) {
					Answer=i;
					break loop;
				}
				
			}
		
		}
		System.out.println(Answer+1);
	
		sc.close();
	}

}