import java.util.Scanner;

class Main {
	public static void main(String[] args) {
	
		Scanner stdIn = new Scanner(System.in);
		
		int[] s = new int[10000];
		
		s[0] = stdIn.nextInt();
		
		for (int i = 0; ;i++) {
		
			if (s[i] % 2 == 0) {
				s[i + 1] = s[i] / 2;
			}
			
			else {
				s[i + 1] = 3 * s[i] + 1; 
			}
			
			for (int j = 0; j < i; j++) {
				if (s[i] == s[j]) {
					System.out.println(i + 1);
					return;
				}
			}
		}

	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
	
		Scanner stdIn = new Scanner(System.in);
		
		int[] s = new int[10000];
		
		s[0] = stdIn.nextInt();
		
		for (int i = 0; ;i++) {
		
			if (s[i] % 2 == 0) {
				s[i + 1] = s[i] / 2;
			}
			
			else {
				s[i + 1] = 3 * s[i] + 1; 
			}
			
			for (int j = 0; j < i; j++) {
				if (s[i] == s[j]) {
					System.out.println(i + 1);
					return;
				}
			}
		}

	}
} Main public static void main(String[] args) {
	
		Scanner stdIn = new Scanner(System.in);
		
		int[] s = new int[10000];
		
		s[0] = stdIn.nextInt();
		
		for (int i = 0; ;i++) {
		
			if (s[i] % 2 == 0) {
				s[i + 1] = s[i] / 2;
			}
			
			else {
				s[i + 1] = 3 * s[i] + 1; 
			}
			
			for (int j = 0; j < i; j++) {
				if (s[i] == s[j]) {
					System.out.println(i + 1);
					return;
				}
			}
		}

	} main {
	
		Scanner stdIn = new Scanner(System.in);
		
		int[] s = new int[10000];
		
		s[0] = stdIn.nextInt();
		
		for (int i = 0; ;i++) {
		
			if (s[i] % 2 == 0) {
				s[i + 1] = s[i] / 2;
			}
			
			else {
				s[i + 1] = 3 * s[i] + 1; 
			}
			
			for (int j = 0; j < i; j++) {
				if (s[i] == s[j]) {
					System.out.println(i + 1);
					return;
				}
			}
		}

	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int[] s = new int[10000]; s new int[10000] 10000 s[0] = stdIn.nextInt() s[0] s 0 stdIn.nextInt() stdIn.nextInt stdIn for (int i = 0; ;i++) {
		
			if (s[i] % 2 == 0) {
				s[i + 1] = s[i] / 2;
			}
			
			else {
				s[i + 1] = 3 * s[i] + 1; 
			}
			
			for (int j = 0; j < i; j++) {
				if (s[i] == s[j]) {
					System.out.println(i + 1);
					return;
				}
			}
		} int i = 0; int i = 0; i 0 i++ i++ i {
		
			if (s[i] % 2 == 0) {
				s[i + 1] = s[i] / 2;
			}
			
			else {
				s[i + 1] = 3 * s[i] + 1; 
			}
			
			for (int j = 0; j < i; j++) {
				if (s[i] == s[j]) {
					System.out.println(i + 1);
					return;
				}
			}
		} {
		
			if (s[i] % 2 == 0) {
				s[i + 1] = s[i] / 2;
			}
			
			else {
				s[i + 1] = 3 * s[i] + 1; 
			}
			
			for (int j = 0; j < i; j++) {
				if (s[i] == s[j]) {
					System.out.println(i + 1);
					return;
				}
			}
		} if (s[i] % 2 == 0) {
				s[i + 1] = s[i] / 2;
			}
			
			else {
				s[i + 1] = 3 * s[i] + 1; 
			} s[i] % 2 == 0 s[i] % 2 s[i] s i 2 0 {
				s[i + 1] = s[i] / 2;
			} s[i + 1] = s[i] / 2 s[i + 1] s i + 1 i 1 s[i] / 2 s[i] s i 2 {
				s[i + 1] = 3 * s[i] + 1; 
			} s[i + 1] = 3 * s[i] + 1 s[i + 1] s i + 1 i 1 3 * s[i] + 1 3 * s[i] 3 s[i] s i 1 for (int j = 0; j < i; j++) {
				if (s[i] == s[j]) {
					System.out.println(i + 1);
					return;
				}
			} int j = 0; int j = 0; j 0 j < i j i j++ j++ j {
				if (s[i] == s[j]) {
					System.out.println(i + 1);
					return;
				}
			} {
				if (s[i] == s[j]) {
					System.out.println(i + 1);
					return;
				}
			} if (s[i] == s[j]) {
					System.out.println(i + 1);
					return;
				} s[i] == s[j] s[i] s i s[j] s 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
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
	
		Scanner stdIn = new Scanner(System.in);
		
		int[] s = new int[10000];
		
		s[0] = stdIn.nextInt();
		
		for (int i = 0; ;i++) {
		
			if (s[i] % 2 == 0) {
				s[i + 1] = s[i] / 2;
			}
			
			else {
				s[i + 1] = 3 * s[i] + 1; 
			}
			
			for (int j = 0; j < i; j++) {
				if (s[i] == s[j]) {
					System.out.println(i + 1);
					return;
				}
			}
		}

	}
}