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

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

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