
import java.util.Scanner;

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

import java.util.Scanner;

public class Main {
	
	public static void main (String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		int cnt = 1;
		
		while (true) {
			if (n == 1 || n == 2 || n == 4) {
				System.out.println(cnt + 3);
				return;
			}
			if (n % 2 == 0) n /= 2;
			else n = n * 3 + 1;
			cnt++;
		}
	}
	
}
