import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		int sum=s,count=0;
		int[] array=new int[10000];
		array[0]=sum;
		do{
			count++;
			//System.out.println(sum);
			if(sum%2==0) {
				sum=sum/2;
			}else {
				sum=sum*3+1;
			}
			array[count]=sum;
			for(int i=0;i<=count-1;i++) {
				for(int j=i+1;j<=count;j++) {
					if(array[j]==array[i]) {
						System.out.println(count+1);
						System.exit(0);
					}
				}
			}
		}while(sum!=s);
	}
}

//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		int sum=s,count=0;
		int[] array=new int[10000];
		array[0]=sum;
		do{
			count++;
			//System.out.println(sum);
			if(sum%2==0) {
				sum=sum/2;
			}else {
				sum=sum*3+1;
			}
			array[count]=sum;
			for(int i=0;i<=count-1;i++) {
				for(int j=i+1;j<=count;j++) {
					if(array[j]==array[i]) {
						System.out.println(count+1);
						System.exit(0);
					}
				}
			}
		}while(sum!=s);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		int sum=s,count=0;
		int[] array=new int[10000];
		array[0]=sum;
		do{
			count++;
			//System.out.println(sum);
			if(sum%2==0) {
				sum=sum/2;
			}else {
				sum=sum*3+1;
			}
			array[count]=sum;
			for(int i=0;i<=count-1;i++) {
				for(int j=i+1;j<=count;j++) {
					if(array[j]==array[i]) {
						System.out.println(count+1);
						System.exit(0);
					}
				}
			}
		}while(sum!=s);
	}
} 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 sum=s,count=0;
		int[] array=new int[10000];
		array[0]=sum;
		do{
			count++;
			//System.out.println(sum);
			if(sum%2==0) {
				sum=sum/2;
			}else {
				sum=sum*3+1;
			}
			array[count]=sum;
			for(int i=0;i<=count-1;i++) {
				for(int j=i+1;j<=count;j++) {
					if(array[j]==array[i]) {
						System.out.println(count+1);
						System.exit(0);
					}
				}
			}
		}while(sum!=s);
	}
}

//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));


