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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		sc.close();
		Set<Integer> se = new HashSet<Integer>();
		se.add(s);
		for (int i = 2; i < 1000000; i++) {
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = 3 * s + 1;
			}
			if (se.contains(s)) {
				System.out.println(i);
				return;
			}
			se.add(s);
		}
	}
} 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) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		sc.close();
		Set<Integer> se = new HashSet<Integer>();
		se.add(s);
		for (int i = 2; i < 1000000; i++) {
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = 3 * s + 1;
			}
			if (se.contains(s)) {
				System.out.println(i);
				return;
			}
			se.add(s);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		sc.close();
		Set<Integer> se = new HashSet<Integer>();
		se.add(s);
		for (int i = 2; i < 1000000; i++) {
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = 3 * s + 1;
			}
			if (se.contains(s)) {
				System.out.println(i);
				return;
			}
			se.add(s);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		sc.close();
		Set<Integer> se = new HashSet<Integer>();
		se.add(s);
		for (int i = 2; i < 1000000; i++) {
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = 3 * s + 1;
			}
			if (se.contains(s)) {
				System.out.println(i);
				return;
			}
			se.add(s);
		}
	} 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 Set<Integer> se = new HashSet<Integer>(); se new HashSet<Integer>() se.add(s) se.add se s for (int i = 2; i < 1000000; i++) {
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = 3 * s + 1;
			}
			if (se.contains(s)) {
				System.out.println(i);
				return;
			}
			se.add(s);
		} int i = 2; int i = 2; i 2 i < 1000000 i 1000000 i++ i++ i {
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = 3 * s + 1;
			}
			if (se.contains(s)) {
				System.out.println(i);
				return;
			}
			se.add(s);
		} {
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = 3 * s + 1;
			}
			if (se.contains(s)) {
				System.out.println(i);
				return;
			}
			se.add(s);
		} if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = 3 * s + 1;
			} s % 2 == 0 s % 2 s 2 0 {
				s = s / 2;
			} s = s / 2 s s / 2 s 2 {
				s = 3 * s + 1;
			} s = 3 * s + 1 s 3 * s + 1 3 * s 3 s 1 if (se.contains(s)) {
				System.out.println(i);
				return;
			} se.contains(s) se.contains se s {
				System.out.println(i);
				return;
			} System.out.println(i) System.out.println System.out System System.out i return; se.add(s) se.add se s String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		sc.close();
		Set<Integer> se = new HashSet<Integer>();
		se.add(s);
		for (int i = 2; i < 1000000; i++) {
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = 3 * s + 1;
			}
			if (se.contains(s)) {
				System.out.println(i);
				return;
			}
			se.add(s);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		sc.close();
		Set<Integer> se = new HashSet<Integer>();
		se.add(s);
		for (int i = 2; i < 1000000; i++) {
			if (s % 2 == 0) {
				s = s / 2;
			} else {
				s = 3 * s + 1;
			}
			if (se.contains(s)) {
				System.out.println(i);
				return;
			}
			se.add(s);
		}
	}
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

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