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

public class Main {
	public static void main(String[] args) {
		Main main = new Main();

		Scanner sc = new Scanner(System.in);
		main.solve(sc);
		sc.close();
	}

	void solve(Scanner sc) {
		int s = sc.nextInt();
		int i = 1;
		Set<Integer> existed = new HashSet<>();

		while (true) {
			if (existed.contains(s)) {
				break;
			}
			existed.add(s);
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = s * 3 + 1;
			}
			i++;
		}
		System.out.println(i);
	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
	public static void main(String[] args) {
		Main main = new Main();

		Scanner sc = new Scanner(System.in);
		main.solve(sc);
		sc.close();
	}

	void solve(Scanner sc) {
		int s = sc.nextInt();
		int i = 1;
		Set<Integer> existed = new HashSet<>();

		while (true) {
			if (existed.contains(s)) {
				break;
			}
			existed.add(s);
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = s * 3 + 1;
			}
			i++;
		}
		System.out.println(i);
	}
} Main public static void main(String[] args) {
		Main main = new Main();

		Scanner sc = new Scanner(System.in);
		main.solve(sc);
		sc.close();
	} main {
		Main main = new Main();

		Scanner sc = new Scanner(System.in);
		main.solve(sc);
		sc.close();
	} Main main = new Main(); main new Main() Scanner sc = new Scanner(System.in); sc new Scanner(System.in) main.solve(sc) main.solve main sc sc.close() sc.close sc String[] args args void solve(Scanner sc) {
		int s = sc.nextInt();
		int i = 1;
		Set<Integer> existed = new HashSet<>();

		while (true) {
			if (existed.contains(s)) {
				break;
			}
			existed.add(s);
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = s * 3 + 1;
			}
			i++;
		}
		System.out.println(i);
	} solve {
		int s = sc.nextInt();
		int i = 1;
		Set<Integer> existed = new HashSet<>();

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

		Scanner sc = new Scanner(System.in);
		main.solve(sc);
		sc.close();
	}

	void solve(Scanner sc) {
		int s = sc.nextInt();
		int i = 1;
		Set<Integer> existed = new HashSet<>();

		while (true) {
			if (existed.contains(s)) {
				break;
			}
			existed.add(s);
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = s * 3 + 1;
			}
			i++;
		}
		System.out.println(i);
	}
} public class Main {
	public static void main(String[] args) {
		Main main = new Main();

		Scanner sc = new Scanner(System.in);
		main.solve(sc);
		sc.close();
	}

	void solve(Scanner sc) {
		int s = sc.nextInt();
		int i = 1;
		Set<Integer> existed = new HashSet<>();

		while (true) {
			if (existed.contains(s)) {
				break;
			}
			existed.add(s);
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = s * 3 + 1;
			}
			i++;
		}
		System.out.println(i);
	}
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();

		Scanner sc = new Scanner(System.in);
		main.solve(sc);
		sc.close();
	}

	void solve(Scanner sc) {
		int s = sc.nextInt();
		int i = 1;
		Set<Integer> existed = new HashSet<>();

		while (true) {
			if (existed.contains(s)) {
				break;
			}
			existed.add(s);
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = s * 3 + 1;
			}
			i++;
		}
		System.out.println(i);
	}
}
