import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int cnt = 1;
		for (int i = 0;;i++) {
			if(A == 4 || A == 2 || A == 1) {
				break;
			}
			if(A % 2 == 0) {
				A = A / 2;
				cnt = cnt + 1;
			}else {
				A = (A * 3) + 1;
				cnt = cnt + 1;
			}
		}
		cnt = cnt + 3;
		System.out.println(cnt);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int cnt = 1;
		for (int i = 0;;i++) {
			if(A == 4 || A == 2 || A == 1) {
				break;
			}
			if(A % 2 == 0) {
				A = A / 2;
				cnt = cnt + 1;
			}else {
				A = (A * 3) + 1;
				cnt = cnt + 1;
			}
		}
		cnt = cnt + 3;
		System.out.println(cnt);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int cnt = 1;
		for (int i = 0;;i++) {
			if(A == 4 || A == 2 || A == 1) {
				break;
			}
			if(A % 2 == 0) {
				A = A / 2;
				cnt = cnt + 1;
			}else {
				A = (A * 3) + 1;
				cnt = cnt + 1;
			}
		}
		cnt = cnt + 3;
		System.out.println(cnt);
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int cnt = 1;
		for (int i = 0;;i++) {
			if(A == 4 || A == 2 || A == 1) {
				break;
			}
			if(A % 2 == 0) {
				A = A / 2;
				cnt = cnt + 1;
			}else {
				A = (A * 3) + 1;
				cnt = cnt + 1;
			}
		}
		cnt = cnt + 3;
		System.out.println(cnt);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int cnt = 1; cnt 1 for (int i = 0;;i++) {
			if(A == 4 || A == 2 || A == 1) {
				break;
			}
			if(A % 2 == 0) {
				A = A / 2;
				cnt = cnt + 1;
			}else {
				A = (A * 3) + 1;
				cnt = cnt + 1;
			}
		} int i = 0; int i = 0; i 0 i++ i++ i {
			if(A == 4 || A == 2 || A == 1) {
				break;
			}
			if(A % 2 == 0) {
				A = A / 2;
				cnt = cnt + 1;
			}else {
				A = (A * 3) + 1;
				cnt = cnt + 1;
			}
		} {
			if(A == 4 || A == 2 || A == 1) {
				break;
			}
			if(A % 2 == 0) {
				A = A / 2;
				cnt = cnt + 1;
			}else {
				A = (A * 3) + 1;
				cnt = cnt + 1;
			}
		} if(A == 4 || A == 2 || A == 1) {
				break;
			} A == 4 || A == 2 || A == 1 A == 4 || A == 2 || A == 1 A == 4 A 4 A == 2 A 2 A == 1 A 1 {
				break;
			} break; if(A % 2 == 0) {
				A = A / 2;
				cnt = cnt + 1;
			}else {
				A = (A * 3) + 1;
				cnt = cnt + 1;
			} A % 2 == 0 A % 2 A 2 0 {
				A = A / 2;
				cnt = cnt + 1;
			} A = A / 2 A A / 2 A 2 cnt = cnt + 1 cnt cnt + 1 cnt 1 {
				A = (A * 3) + 1;
				cnt = cnt + 1;
			} A = (A * 3) + 1 A (A * 3) + 1 (A * 3) A 3 1 cnt = cnt + 1 cnt cnt + 1 cnt 1 cnt = cnt + 3 cnt cnt + 3 cnt 3 System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int cnt = 1;
		for (int i = 0;;i++) {
			if(A == 4 || A == 2 || A == 1) {
				break;
			}
			if(A % 2 == 0) {
				A = A / 2;
				cnt = cnt + 1;
			}else {
				A = (A * 3) + 1;
				cnt = cnt + 1;
			}
		}
		cnt = cnt + 3;
		System.out.println(cnt);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int cnt = 1;
		for (int i = 0;;i++) {
			if(A == 4 || A == 2 || A == 1) {
				break;
			}
			if(A % 2 == 0) {
				A = A / 2;
				cnt = cnt + 1;
			}else {
				A = (A * 3) + 1;
				cnt = cnt + 1;
			}
		}
		cnt = cnt + 3;
		System.out.println(cnt);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int cnt = 1;
		for (int i = 0;;i++) {
			if(A == 4 || A == 2 || A == 1) {
				break;
			}
			if(A % 2 == 0) {
				A = A / 2;
				cnt = cnt + 1;
			}else {
				A = (A * 3) + 1;
				cnt = cnt + 1;
			}
		}
		cnt = cnt + 3;
		System.out.println(cnt);
	}
}
