import java.util.*;
import java.math.*;
import java.lang.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int s = sc.nextInt();

		if(s == 1){
			System.out.println(4);
		}else if(s ==2){
			System.out.println(4);
		}else
		{
			int count =1;
			do {
				if(s%2 ==0){
					s = s/2;
				}else{
					s = s*3 +1;
				}
			
				count++;
			} while (s!=1);
			System.out.println(count + 1);

		}

	}
} import java.util.*; util.* java import java.math.*; math.* java import java.lang.*; lang.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int s = sc.nextInt();

		if(s == 1){
			System.out.println(4);
		}else if(s ==2){
			System.out.println(4);
		}else
		{
			int count =1;
			do {
				if(s%2 ==0){
					s = s/2;
				}else{
					s = s*3 +1;
				}
			
				count++;
			} while (s!=1);
			System.out.println(count + 1);

		}

	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int s = sc.nextInt();

		if(s == 1){
			System.out.println(4);
		}else if(s ==2){
			System.out.println(4);
		}else
		{
			int count =1;
			do {
				if(s%2 ==0){
					s = s/2;
				}else{
					s = s*3 +1;
				}
			
				count++;
			} while (s!=1);
			System.out.println(count + 1);

		}

	} main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int s = sc.nextInt();

		if(s == 1){
			System.out.println(4);
		}else if(s ==2){
			System.out.println(4);
		}else
		{
			int count =1;
			do {
				if(s%2 ==0){
					s = s/2;
				}else{
					s = s*3 +1;
				}
			
				count++;
			} while (s!=1);
			System.out.println(count + 1);

		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc if(s == 1){
			System.out.println(4);
		}else if(s ==2){
			System.out.println(4);
		}else
		{
			int count =1;
			do {
				if(s%2 ==0){
					s = s/2;
				}else{
					s = s*3 +1;
				}
			
				count++;
			} while (s!=1);
			System.out.println(count + 1);

		} s == 1 s 1 {
			System.out.println(4);
		} System.out.println(4) System.out.println System.out System System.out 4 if(s ==2){
			System.out.println(4);
		}else
		{
			int count =1;
			do {
				if(s%2 ==0){
					s = s/2;
				}else{
					s = s*3 +1;
				}
			
				count++;
			} while (s!=1);
			System.out.println(count + 1);

		} s ==2 s 2 {
			System.out.println(4);
		} System.out.println(4) System.out.println System.out System System.out 4 {
			int count =1;
			do {
				if(s%2 ==0){
					s = s/2;
				}else{
					s = s*3 +1;
				}
			
				count++;
			} while (s!=1);
			System.out.println(count + 1);

		} int count =1; count 1 do {
				if(s%2 ==0){
					s = s/2;
				}else{
					s = s*3 +1;
				}
			
				count++;
			} while (s!=1); s!=1 s 1 {
				if(s%2 ==0){
					s = s/2;
				}else{
					s = s*3 +1;
				}
			
				count++;
			} if(s%2 ==0){
					s = s/2;
				}else{
					s = s*3 +1;
				} s%2 ==0 s%2 s 2 0 {
					s = s/2;
				} s = s/2 s s/2 s 2 {
					s = s*3 +1;
				} s = s*3 +1 s s*3 +1 s*3 s 3 1 count++ count System.out.println(count + 1) System.out.println System.out System System.out count + 1 count 1 String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int s = sc.nextInt();

		if(s == 1){
			System.out.println(4);
		}else if(s ==2){
			System.out.println(4);
		}else
		{
			int count =1;
			do {
				if(s%2 ==0){
					s = s/2;
				}else{
					s = s*3 +1;
				}
			
				count++;
			} while (s!=1);
			System.out.println(count + 1);

		}

	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int s = sc.nextInt();

		if(s == 1){
			System.out.println(4);
		}else if(s ==2){
			System.out.println(4);
		}else
		{
			int count =1;
			do {
				if(s%2 ==0){
					s = s/2;
				}else{
					s = s*3 +1;
				}
			
				count++;
			} while (s!=1);
			System.out.println(count + 1);

		}

	}
} Main
import java.util.*;
import java.math.*;
import java.lang.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int s = sc.nextInt();

		if(s == 1){
			System.out.println(4);
		}else if(s ==2){
			System.out.println(4);
		}else
		{
			int count =1;
			do {
				if(s%2 ==0){
					s = s/2;
				}else{
					s = s*3 +1;
				}
			
				count++;
			} while (s!=1);
			System.out.println(count + 1);

		}

	}
}