import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] array = new int[1000000];
		int s = sc.nextInt();
		sc.close();
		int i = 1;
		int previous = s;
		array[previous-1] = 1;
		while(true) {
			previous = getFN(previous);
			if(array[previous-1] != 1) {
				array[previous-1] = 1;
				i++;
			}else
				break;
		}
		System.out.println(i+1);
		
	}
	
	static int getFN(int n) {
		if(n%2 == 0) {
			return n/2;
		}else {
			return 3*n+1;
		}
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] array = new int[1000000];
		int s = sc.nextInt();
		sc.close();
		int i = 1;
		int previous = s;
		array[previous-1] = 1;
		while(true) {
			previous = getFN(previous);
			if(array[previous-1] != 1) {
				array[previous-1] = 1;
				i++;
			}else
				break;
		}
		System.out.println(i+1);
		
	}
	
	static int getFN(int n) {
		if(n%2 == 0) {
			return n/2;
		}else {
			return 3*n+1;
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] array = new int[1000000];
		int s = sc.nextInt();
		sc.close();
		int i = 1;
		int previous = s;
		array[previous-1] = 1;
		while(true) {
			previous = getFN(previous);
			if(array[previous-1] != 1) {
				array[previous-1] = 1;
				i++;
			}else
				break;
		}
		System.out.println(i+1);
		
	} main {
		Scanner sc = new Scanner(System.in);
		int[] array = new int[1000000];
		int s = sc.nextInt();
		sc.close();
		int i = 1;
		int previous = s;
		array[previous-1] = 1;
		while(true) {
			previous = getFN(previous);
			if(array[previous-1] != 1) {
				array[previous-1] = 1;
				i++;
			}else
				break;
		}
		System.out.println(i+1);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] array = new int[1000000]; array new int[1000000] 1000000 int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc sc.close() sc.close sc int i = 1; i 1 int previous = s; previous s array[previous-1] = 1 array[previous-1] array previous-1 previous 1 1 while(true) {
			previous = getFN(previous);
			if(array[previous-1] != 1) {
				array[previous-1] = 1;
				i++;
			}else
				break;
		} true {
			previous = getFN(previous);
			if(array[previous-1] != 1) {
				array[previous-1] = 1;
				i++;
			}else
				break;
		} previous = getFN(previous) previous getFN(previous) getFN previous if(array[previous-1] != 1) {
				array[previous-1] = 1;
				i++;
			}else
				break; array[previous-1] != 1 array[previous-1] array previous-1 previous 1 1 {
				array[previous-1] = 1;
				i++;
			} array[previous-1] = 1 array[previous-1] array previous-1 previous 1 1 i++ i break; System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 String[] args args static int getFN(int n) {
		if(n%2 == 0) {
			return n/2;
		}else {
			return 3*n+1;
		}
	} getFN {
		if(n%2 == 0) {
			return n/2;
		}else {
			return 3*n+1;
		}
	} if(n%2 == 0) {
			return n/2;
		}else {
			return 3*n+1;
		} n%2 == 0 n%2 n 2 0 {
			return n/2;
		} return n/2; n/2 n 2 {
			return 3*n+1;
		} return 3*n+1; 3*n+1 3*n 3 n 1 int n n public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] array = new int[1000000];
		int s = sc.nextInt();
		sc.close();
		int i = 1;
		int previous = s;
		array[previous-1] = 1;
		while(true) {
			previous = getFN(previous);
			if(array[previous-1] != 1) {
				array[previous-1] = 1;
				i++;
			}else
				break;
		}
		System.out.println(i+1);
		
	}
	
	static int getFN(int n) {
		if(n%2 == 0) {
			return n/2;
		}else {
			return 3*n+1;
		}
	}
} public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] array = new int[1000000];
		int s = sc.nextInt();
		sc.close();
		int i = 1;
		int previous = s;
		array[previous-1] = 1;
		while(true) {
			previous = getFN(previous);
			if(array[previous-1] != 1) {
				array[previous-1] = 1;
				i++;
			}else
				break;
		}
		System.out.println(i+1);
		
	}
	
	static int getFN(int n) {
		if(n%2 == 0) {
			return n/2;
		}else {
			return 3*n+1;
		}
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] array = new int[1000000];
		int s = sc.nextInt();
		sc.close();
		int i = 1;
		int previous = s;
		array[previous-1] = 1;
		while(true) {
			previous = getFN(previous);
			if(array[previous-1] != 1) {
				array[previous-1] = 1;
				i++;
			}else
				break;
		}
		System.out.println(i+1);
		
	}
	
	static int getFN(int n) {
		if(n%2 == 0) {
			return n/2;
		}else {
			return 3*n+1;
		}
	}
}