import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		int array[] = new int[1000000];
		int i = 0;
		array[0] = num;
		
		do{
			if(array[i] % 2 == 0) {
				array[i+1] = array[i] / 2; 
			}else {
				array[i+1] = array[i] * 3 + 1;
			}
			i++;
		}while(!proc(array,array[i],i));
		
		System.out.println(i + 1);
	}
	
	public static boolean proc(int array[], int val, int len) {
		for(int i = 0; i < len; i++) {
			if(val == array[i]) {
				return true;
			}
		}
		return false;
	}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		int array[] = new int[1000000];
		int i = 0;
		array[0] = num;
		
		do{
			if(array[i] % 2 == 0) {
				array[i+1] = array[i] / 2; 
			}else {
				array[i+1] = array[i] * 3 + 1;
			}
			i++;
		}while(!proc(array,array[i],i));
		
		System.out.println(i + 1);
	}
	
	public static boolean proc(int array[], int val, int len) {
		for(int i = 0; i < len; i++) {
			if(val == array[i]) {
				return true;
			}
		}
		return false;
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		int array[] = new int[1000000];
		int i = 0;
		array[0] = num;
		
		do{
			if(array[i] % 2 == 0) {
				array[i+1] = array[i] / 2; 
			}else {
				array[i+1] = array[i] * 3 + 1;
			}
			i++;
		}while(!proc(array,array[i],i));
		
		System.out.println(i + 1);
	} main {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		int array[] = new int[1000000];
		int i = 0;
		array[0] = num;
		
		do{
			if(array[i] % 2 == 0) {
				array[i+1] = array[i] / 2; 
			}else {
				array[i+1] = array[i] * 3 + 1;
			}
			i++;
		}while(!proc(array,array[i],i));
		
		System.out.println(i + 1);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc int array[] = new int[1000000]; array new int[1000000] 1000000 int i = 0; i 0 array[0] = num array[0] array 0 num do{
			if(array[i] % 2 == 0) {
				array[i+1] = array[i] / 2; 
			}else {
				array[i+1] = array[i] * 3 + 1;
			}
			i++;
		}while(!proc(array,array[i],i)); !proc(array,array[i],i) proc(array,array[i],i) proc array array[i] array i i {
			if(array[i] % 2 == 0) {
				array[i+1] = array[i] / 2; 
			}else {
				array[i+1] = array[i] * 3 + 1;
			}
			i++;
		} if(array[i] % 2 == 0) {
				array[i+1] = array[i] / 2; 
			}else {
				array[i+1] = array[i] * 3 + 1;
			} array[i] % 2 == 0 array[i] % 2 array[i] array i 2 0 {
				array[i+1] = array[i] / 2; 
			} array[i+1] = array[i] / 2 array[i+1] array i+1 i 1 array[i] / 2 array[i] array i 2 {
				array[i+1] = array[i] * 3 + 1;
			} array[i+1] = array[i] * 3 + 1 array[i+1] array i+1 i 1 array[i] * 3 + 1 array[i] * 3 array[i] array i 3 1 i++ i System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 String args[] args public static boolean proc(int array[], int val, int len) {
		for(int i = 0; i < len; i++) {
			if(val == array[i]) {
				return true;
			}
		}
		return false;
	} proc {
		for(int i = 0; i < len; i++) {
			if(val == array[i]) {
				return true;
			}
		}
		return false;
	} for(int i = 0; i < len; i++) {
			if(val == array[i]) {
				return true;
			}
		} int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
			if(val == array[i]) {
				return true;
			}
		} {
			if(val == array[i]) {
				return true;
			}
		} if(val == array[i]) {
				return true;
			} val == array[i] val array[i] array i {
				return true;
			} return true; true return false; false int array[] array int val val int len len public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		int array[] = new int[1000000];
		int i = 0;
		array[0] = num;
		
		do{
			if(array[i] % 2 == 0) {
				array[i+1] = array[i] / 2; 
			}else {
				array[i+1] = array[i] * 3 + 1;
			}
			i++;
		}while(!proc(array,array[i],i));
		
		System.out.println(i + 1);
	}
	
	public static boolean proc(int array[], int val, int len) {
		for(int i = 0; i < len; i++) {
			if(val == array[i]) {
				return true;
			}
		}
		return false;
	}
} public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		int array[] = new int[1000000];
		int i = 0;
		array[0] = num;
		
		do{
			if(array[i] % 2 == 0) {
				array[i+1] = array[i] / 2; 
			}else {
				array[i+1] = array[i] * 3 + 1;
			}
			i++;
		}while(!proc(array,array[i],i));
		
		System.out.println(i + 1);
	}
	
	public static boolean proc(int array[], int val, int len) {
		for(int i = 0; i < len; i++) {
			if(val == array[i]) {
				return true;
			}
		}
		return false;
	}
} Main
import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		int array[] = new int[1000000];
		int i = 0;
		array[0] = num;
		
		do{
			if(array[i] % 2 == 0) {
				array[i+1] = array[i] / 2; 
			}else {
				array[i+1] = array[i] * 3 + 1;
			}
			i++;
		}while(!proc(array,array[i],i));
		
		System.out.println(i + 1);
	}
	
	public static boolean proc(int array[], int val, int len) {
		for(int i = 0; i < len; i++) {
			if(val == array[i]) {
				return true;
			}
		}
		return false;
	}
}
