import java.util.Scanner;

public class Main {

	public static int f(int n) {
		if (n % 2 == 0)
			return n / 2;
		else
			return 3 * n + 1;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		sc.close();
		int ans = 1, tmp = s, t = 4;
		if(s == 1 || s == 2) 
			t = s;
		
			while (tmp != t) {
				tmp = f(tmp);
				++ans;
			}
		ans += 3;
		System.out.println(ans);
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static int f(int n) {
		if (n % 2 == 0)
			return n / 2;
		else
			return 3 * n + 1;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		sc.close();
		int ans = 1, tmp = s, t = 4;
		if(s == 1 || s == 2) 
			t = s;
		
			while (tmp != t) {
				tmp = f(tmp);
				++ans;
			}
		ans += 3;
		System.out.println(ans);
	}

} Main public static int f(int n) {
		if (n % 2 == 0)
			return n / 2;
		else
			return 3 * n + 1;
	} f {
		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; n / 2 n 2 return 3 * n + 1; 3 * n + 1 3 * n 3 n 1 int n n public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		sc.close();
		int ans = 1, tmp = s, t = 4;
		if(s == 1 || s == 2) 
			t = s;
		
			while (tmp != t) {
				tmp = f(tmp);
				++ans;
			}
		ans += 3;
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		sc.close();
		int ans = 1, tmp = s, t = 4;
		if(s == 1 || s == 2) 
			t = s;
		
			while (tmp != t) {
				tmp = f(tmp);
				++ans;
			}
		ans += 3;
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc sc.close() sc.close sc int ans = 1 ans 1 tmp = s tmp s t = 4; t 4 if(s == 1 || s == 2) 
			t = s; s == 1 || s == 2 s == 1 s 1 s == 2 s 2 t = s t s while (tmp != t) {
				tmp = f(tmp);
				++ans;
			} tmp != t tmp t {
				tmp = f(tmp);
				++ans;
			} tmp = f(tmp) tmp f(tmp) f tmp ++ans ans ans += 3 ans 3 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static int f(int n) {
		if (n % 2 == 0)
			return n / 2;
		else
			return 3 * n + 1;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		sc.close();
		int ans = 1, tmp = s, t = 4;
		if(s == 1 || s == 2) 
			t = s;
		
			while (tmp != t) {
				tmp = f(tmp);
				++ans;
			}
		ans += 3;
		System.out.println(ans);
	}

} public class Main {

	public static int f(int n) {
		if (n % 2 == 0)
			return n / 2;
		else
			return 3 * n + 1;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		sc.close();
		int ans = 1, tmp = s, t = 4;
		if(s == 1 || s == 2) 
			t = s;
		
			while (tmp != t) {
				tmp = f(tmp);
				++ans;
			}
		ans += 3;
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main {

	public static int f(int n) {
		if (n % 2 == 0)
			return n / 2;
		else
			return 3 * n + 1;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		sc.close();
		int ans = 1, tmp = s, t = 4;
		if(s == 1 || s == 2) 
			t = s;
		
			while (tmp != t) {
				tmp = f(tmp);
				++ans;
			}
		ans += 3;
		System.out.println(ans);
	}

}
