import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);


		int[] a = new int[1000000];
		a[0] = sc.nextInt();

		for (int i = 0; i < a.length - 1; i++) {
			if (a[i] % 2 == 0) {
				a[i + 1] = a[i] / 2;
			} else {
				a[i + 1] = 3 * a[i] + 1;
			}

			for (int j = 0; j < i; j++) {
				if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				}
			}

		}

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

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);


		int[] a = new int[1000000];
		a[0] = sc.nextInt();

		for (int i = 0; i < a.length - 1; i++) {
			if (a[i] % 2 == 0) {
				a[i + 1] = a[i] / 2;
			} else {
				a[i + 1] = 3 * a[i] + 1;
			}

			for (int j = 0; j < i; j++) {
				if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				}
			}

		}

	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);


		int[] a = new int[1000000];
		a[0] = sc.nextInt();

		for (int i = 0; i < a.length - 1; i++) {
			if (a[i] % 2 == 0) {
				a[i + 1] = a[i] / 2;
			} else {
				a[i + 1] = 3 * a[i] + 1;
			}

			for (int j = 0; j < i; j++) {
				if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				}
			}

		}

	} main {

		Scanner sc = new Scanner(System.in);


		int[] a = new int[1000000];
		a[0] = sc.nextInt();

		for (int i = 0; i < a.length - 1; i++) {
			if (a[i] % 2 == 0) {
				a[i + 1] = a[i] / 2;
			} else {
				a[i + 1] = 3 * a[i] + 1;
			}

			for (int j = 0; j < i; j++) {
				if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				}
			}

		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] a = new int[1000000]; a new int[1000000] 1000000 a[0] = sc.nextInt() a[0] a 0 sc.nextInt() sc.nextInt sc for (int i = 0; i < a.length - 1; i++) {
			if (a[i] % 2 == 0) {
				a[i + 1] = a[i] / 2;
			} else {
				a[i + 1] = 3 * a[i] + 1;
			}

			for (int j = 0; j < i; j++) {
				if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				}
			}

		} int i = 0; int i = 0; i 0 i < a.length - 1 i a.length - 1 a.length a a.length 1 i++ i++ i {
			if (a[i] % 2 == 0) {
				a[i + 1] = a[i] / 2;
			} else {
				a[i + 1] = 3 * a[i] + 1;
			}

			for (int j = 0; j < i; j++) {
				if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				}
			}

		} {
			if (a[i] % 2 == 0) {
				a[i + 1] = a[i] / 2;
			} else {
				a[i + 1] = 3 * a[i] + 1;
			}

			for (int j = 0; j < i; j++) {
				if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				}
			}

		} if (a[i] % 2 == 0) {
				a[i + 1] = a[i] / 2;
			} else {
				a[i + 1] = 3 * a[i] + 1;
			} a[i] % 2 == 0 a[i] % 2 a[i] a i 2 0 {
				a[i + 1] = a[i] / 2;
			} a[i + 1] = a[i] / 2 a[i + 1] a i + 1 i 1 a[i] / 2 a[i] a i 2 {
				a[i + 1] = 3 * a[i] + 1;
			} a[i + 1] = 3 * a[i] + 1 a[i + 1] a i + 1 i 1 3 * a[i] + 1 3 * a[i] 3 a[i] a i 1 for (int j = 0; j < i; j++) {
				if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				}
			} int j = 0; int j = 0; j 0 j < i j i j++ j++ j {
				if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				}
			} {
				if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				}
			} if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				} a[j] == a[i] a[j] a j a[i] a i {
					System.out.println(i + 1);
					System.exit(0);
				} System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 System.exit(0) System.exit System 0 String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);


		int[] a = new int[1000000];
		a[0] = sc.nextInt();

		for (int i = 0; i < a.length - 1; i++) {
			if (a[i] % 2 == 0) {
				a[i + 1] = a[i] / 2;
			} else {
				a[i + 1] = 3 * a[i] + 1;
			}

			for (int j = 0; j < i; j++) {
				if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				}
			}

		}

	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);


		int[] a = new int[1000000];
		a[0] = sc.nextInt();

		for (int i = 0; i < a.length - 1; i++) {
			if (a[i] % 2 == 0) {
				a[i + 1] = a[i] / 2;
			} else {
				a[i + 1] = 3 * a[i] + 1;
			}

			for (int j = 0; j < i; j++) {
				if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				}
			}

		}

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);


		int[] a = new int[1000000];
		a[0] = sc.nextInt();

		for (int i = 0; i < a.length - 1; i++) {
			if (a[i] % 2 == 0) {
				a[i + 1] = a[i] / 2;
			} else {
				a[i + 1] = 3 * a[i] + 1;
			}

			for (int j = 0; j < i; j++) {
				if (a[j] == a[i]) {
					System.out.println(i + 1);
					System.exit(0);
				}
			}

		}

	}
}