import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		List<Integer> a = new ArrayList<>();
		a.add(s);
		int ans = 0;
		for (int i = 0; i < 1000000; i++) {
			int ai = a.get(i) % 2 == 0 ? a.get(i) / 2 : 3 * a.get(i) + 1;
			if (a.contains(ai)) {
				ans = i + 2;
				break;
			}
			a.add(ai);
		}
		System.out.println(ans);
		sc.close();
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		List<Integer> a = new ArrayList<>();
		a.add(s);
		int ans = 0;
		for (int i = 0; i < 1000000; i++) {
			int ai = a.get(i) % 2 == 0 ? a.get(i) / 2 : 3 * a.get(i) + 1;
			if (a.contains(ai)) {
				ans = i + 2;
				break;
			}
			a.add(ai);
		}
		System.out.println(ans);
		sc.close();
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		List<Integer> a = new ArrayList<>();
		a.add(s);
		int ans = 0;
		for (int i = 0; i < 1000000; i++) {
			int ai = a.get(i) % 2 == 0 ? a.get(i) / 2 : 3 * a.get(i) + 1;
			if (a.contains(ai)) {
				ans = i + 2;
				break;
			}
			a.add(ai);
		}
		System.out.println(ans);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		List<Integer> a = new ArrayList<>();
		a.add(s);
		int ans = 0;
		for (int i = 0; i < 1000000; i++) {
			int ai = a.get(i) % 2 == 0 ? a.get(i) / 2 : 3 * a.get(i) + 1;
			if (a.contains(ai)) {
				ans = i + 2;
				break;
			}
			a.add(ai);
		}
		System.out.println(ans);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = Integer.parseInt(sc.next()); s Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc List<Integer> a = new ArrayList<>(); a new ArrayList<>() a.add(s) a.add a s int ans = 0; ans 0 for (int i = 0; i < 1000000; i++) {
			int ai = a.get(i) % 2 == 0 ? a.get(i) / 2 : 3 * a.get(i) + 1;
			if (a.contains(ai)) {
				ans = i + 2;
				break;
			}
			a.add(ai);
		} int i = 0; int i = 0; i 0 i < 1000000 i 1000000 i++ i++ i {
			int ai = a.get(i) % 2 == 0 ? a.get(i) / 2 : 3 * a.get(i) + 1;
			if (a.contains(ai)) {
				ans = i + 2;
				break;
			}
			a.add(ai);
		} {
			int ai = a.get(i) % 2 == 0 ? a.get(i) / 2 : 3 * a.get(i) + 1;
			if (a.contains(ai)) {
				ans = i + 2;
				break;
			}
			a.add(ai);
		} int ai = a.get(i) % 2 == 0 ? a.get(i) / 2 : 3 * a.get(i) + 1; ai a.get(i) % 2 == 0 ? a.get(i) / 2 : 3 * a.get(i) + 1 a.get(i) % 2 == 0 a.get(i) % 2 a.get(i) a.get a i 2 0 a.get(i) / 2 a.get(i) a.get a i 2 3 * a.get(i) + 1 3 * a.get(i) 3 a.get(i) a.get a i 1 if (a.contains(ai)) {
				ans = i + 2;
				break;
			} a.contains(ai) a.contains a ai {
				ans = i + 2;
				break;
			} ans = i + 2 ans i + 2 i 2 break; a.add(ai) a.add a ai System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		List<Integer> a = new ArrayList<>();
		a.add(s);
		int ans = 0;
		for (int i = 0; i < 1000000; i++) {
			int ai = a.get(i) % 2 == 0 ? a.get(i) / 2 : 3 * a.get(i) + 1;
			if (a.contains(ai)) {
				ans = i + 2;
				break;
			}
			a.add(ai);
		}
		System.out.println(ans);
		sc.close();
	}
} public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		List<Integer> a = new ArrayList<>();
		a.add(s);
		int ans = 0;
		for (int i = 0; i < 1000000; i++) {
			int ai = a.get(i) % 2 == 0 ? a.get(i) / 2 : 3 * a.get(i) + 1;
			if (a.contains(ai)) {
				ans = i + 2;
				break;
			}
			a.add(ai);
		}
		System.out.println(ans);
		sc.close();
	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int s = Integer.parseInt(sc.next());
		List<Integer> a = new ArrayList<>();
		a.add(s);
		int ans = 0;
		for (int i = 0; i < 1000000; i++) {
			int ai = a.get(i) % 2 == 0 ? a.get(i) / 2 : 3 * a.get(i) + 1;
			if (a.contains(ai)) {
				ans = i + 2;
				break;
			}
			a.add(ai);
		}
		System.out.println(ans);
		sc.close();
	}
}