import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	private static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int s = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for (int i = 0; ; i++) {
			if (set.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				set.add(s);
			}
			s = s % 2 == 0 ? s / 2 : s * 3 + 1;
		}
	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {

	private static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int s = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for (int i = 0; ; i++) {
			if (set.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				set.add(s);
			}
			s = s % 2 == 0 ? s / 2 : s * 3 + 1;
		}
	}
} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		int s = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for (int i = 0; ; i++) {
			if (set.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				set.add(s);
			}
			s = s % 2 == 0 ? s / 2 : s * 3 + 1;
		}
	} main {
		int s = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for (int i = 0; ; i++) {
			if (set.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				set.add(s);
			}
			s = s % 2 == 0 ? s / 2 : s * 3 + 1;
		}
	} int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc Set<Integer> set = new HashSet<>(); set new HashSet<>() for (int i = 0; ; i++) {
			if (set.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				set.add(s);
			}
			s = s % 2 == 0 ? s / 2 : s * 3 + 1;
		} int i = 0; int i = 0; i 0 i++ i++ i {
			if (set.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				set.add(s);
			}
			s = s % 2 == 0 ? s / 2 : s * 3 + 1;
		} {
			if (set.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				set.add(s);
			}
			s = s % 2 == 0 ? s / 2 : s * 3 + 1;
		} if (set.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				set.add(s);
			} set.contains(s) set.contains set s {
				System.out.println(i + 1);
				return;
			} System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 return; {
				set.add(s);
			} set.add(s) set.add set s s = s % 2 == 0 ? s / 2 : s * 3 + 1 s s % 2 == 0 ? s / 2 : s * 3 + 1 s % 2 == 0 s % 2 s 2 0 s / 2 s 2 s * 3 + 1 s * 3 s 3 1 String[] args args public class Main {

	private static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int s = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for (int i = 0; ; i++) {
			if (set.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				set.add(s);
			}
			s = s % 2 == 0 ? s / 2 : s * 3 + 1;
		}
	}
} public class Main {

	private static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int s = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for (int i = 0; ; i++) {
			if (set.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				set.add(s);
			}
			s = s % 2 == 0 ? s / 2 : s * 3 + 1;
		}
	}
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	private static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int s = sc.nextInt();
		Set<Integer> set = new HashSet<>();
		for (int i = 0; ; i++) {
			if (set.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				set.add(s);
			}
			s = s % 2 == 0 ? s / 2 : s * 3 + 1;
		}
	}
}