import java.util.Scanner;

class Main{

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		// get a integer
		int num = sc.nextInt();
		
		int result = getResult(num);
		System.out.println(result);
	}
	
	public static boolean isMaxNum(int num) {
		return num > 100 ? true : false;
	}
	
	public static boolean isOddNumber(int num) {
		return (num % 2) != 0 ? true : false;
	}
	
	public static int getInteger(int num) {
		if(isOddNumber(num)) {
			return (3 * num) + 1;
		}
		
		return num / 2;
	}
	
	public static int getResult(int num) {
		if(isMaxNum(num)) {
			return 0;
		}
		
		String[] temp = new String[1000000];
		
		//boolean notFound = true;
		int index = 1;
		while(true) {
			if(temp[num] != null) {
				break;	
			}
			temp[num] = "inserted";
			num = getInteger(num);
			
			index++;
		}
		return index;
	}
	
} import java.util.Scanner; Scanner java.util class Main{

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		// get a integer
		int num = sc.nextInt();
		
		int result = getResult(num);
		System.out.println(result);
	}
	
	public static boolean isMaxNum(int num) {
		return num > 100 ? true : false;
	}
	
	public static boolean isOddNumber(int num) {
		return (num % 2) != 0 ? true : false;
	}
	
	public static int getInteger(int num) {
		if(isOddNumber(num)) {
			return (3 * num) + 1;
		}
		
		return num / 2;
	}
	
	public static int getResult(int num) {
		if(isMaxNum(num)) {
			return 0;
		}
		
		String[] temp = new String[1000000];
		
		//boolean notFound = true;
		int index = 1;
		while(true) {
			if(temp[num] != null) {
				break;	
			}
			temp[num] = "inserted";
			num = getInteger(num);
			
			index++;
		}
		return index;
	}
	
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		// get a integer
		int num = sc.nextInt();
		
		int result = getResult(num);
		System.out.println(result);
	} main {
		
		Scanner sc = new Scanner(System.in);
		// get a integer
		int num = sc.nextInt();
		
		int result = getResult(num);
		System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc int result = getResult(num); result getResult(num) getResult num System.out.println(result) System.out.println System.out System System.out result String[] args args public static boolean isMaxNum(int num) {
		return num > 100 ? true : false;
	} isMaxNum {
		return num > 100 ? true : false;
	} return num > 100 ? true : false; num > 100 ? true : false num > 100 num 100 true false int num num public static boolean isOddNumber(int num) {
		return (num % 2) != 0 ? true : false;
	} isOddNumber {
		return (num % 2) != 0 ? true : false;
	} return (num % 2) != 0 ? true : false; (num % 2) != 0 ? true : false (num % 2) != 0 (num % 2) num 2 0 true false int num num public static int getInteger(int num) {
		if(isOddNumber(num)) {
			return (3 * num) + 1;
		}
		
		return num / 2;
	} getInteger {
		if(isOddNumber(num)) {
			return (3 * num) + 1;
		}
		
		return num / 2;
	} if(isOddNumber(num)) {
			return (3 * num) + 1;
		} isOddNumber(num) isOddNumber num {
			return (3 * num) + 1;
		} return (3 * num) + 1; (3 * num) + 1 (3 * num) 3 num 1 return num / 2; num / 2 num 2 int num num public static int getResult(int num) {
		if(isMaxNum(num)) {
			return 0;
		}
		
		String[] temp = new String[1000000];
		
		//boolean notFound = true;
		int index = 1;
		while(true) {
			if(temp[num] != null) {
				break;	
			}
			temp[num] = "inserted";
			num = getInteger(num);
			
			index++;
		}
		return index;
	} getResult {
		if(isMaxNum(num)) {
			return 0;
		}
		
		String[] temp = new String[1000000];
		
		//boolean notFound = true;
		int index = 1;
		while(true) {
			if(temp[num] != null) {
				break;	
			}
			temp[num] = "inserted";
			num = getInteger(num);
			
			index++;
		}
		return index;
	} if(isMaxNum(num)) {
			return 0;
		} isMaxNum(num) isMaxNum num {
			return 0;
		} return 0; 0 String[] temp = new String[1000000]; temp new String[1000000] 1000000 int index = 1; index 1 while(true) {
			if(temp[num] != null) {
				break;	
			}
			temp[num] = "inserted";
			num = getInteger(num);
			
			index++;
		} true {
			if(temp[num] != null) {
				break;	
			}
			temp[num] = "inserted";
			num = getInteger(num);
			
			index++;
		} if(temp[num] != null) {
				break;	
			} temp[num] != null temp[num] temp num null {
				break;	
			} break; temp[num] = "inserted" temp[num] temp num "inserted" num = getInteger(num) num getInteger(num) getInteger num index++ index return index; index int num num
import java.util.Scanner;

class Main{

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		// get a integer
		int num = sc.nextInt();
		
		int result = getResult(num);
		System.out.println(result);
	}
	
	public static boolean isMaxNum(int num) {
		return num > 100 ? true : false;
	}
	
	public static boolean isOddNumber(int num) {
		return (num % 2) != 0 ? true : false;
	}
	
	public static int getInteger(int num) {
		if(isOddNumber(num)) {
			return (3 * num) + 1;
		}
		
		return num / 2;
	}
	
	public static int getResult(int num) {
		if(isMaxNum(num)) {
			return 0;
		}
		
		String[] temp = new String[1000000];
		
		//boolean notFound = true;
		int index = 1;
		while(true) {
			if(temp[num] != null) {
				break;	
			}
			temp[num] = "inserted";
			num = getInteger(num);
			
			index++;
		}
		return index;
	}
	
}
