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

class Main {

	public static void main(String args[]) {
		Main col = new Main();
		Scanner sc = new Scanner(System.in);
		int input = sc.nextInt();
		List<Integer> number = new ArrayList<Integer>();
		number.add(input);
		int minimum = 1000000;
		for (int i = 1; i <= 1000000; i++) {
			int result = col.returnNumbers(number.get(i - 1));
//			System.out.println("i = "+i +" " +result);
			if (number.contains(result)) {
				minimum = i + 1;
				break;
			}
			number.add(result);
		}
		System.out.print(minimum);

	}

	public int returnNumbers(int x) {
		if (x % 2 == 0)
			return x / 2;
		else
			return 3 * x + 1;
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util class Main {

	public static void main(String args[]) {
		Main col = new Main();
		Scanner sc = new Scanner(System.in);
		int input = sc.nextInt();
		List<Integer> number = new ArrayList<Integer>();
		number.add(input);
		int minimum = 1000000;
		for (int i = 1; i <= 1000000; i++) {
			int result = col.returnNumbers(number.get(i - 1));
//			System.out.println("i = "+i +" " +result);
			if (number.contains(result)) {
				minimum = i + 1;
				break;
			}
			number.add(result);
		}
		System.out.print(minimum);

	}

	public int returnNumbers(int x) {
		if (x % 2 == 0)
			return x / 2;
		else
			return 3 * x + 1;
	}
} Main public static void main(String args[]) {
		Main col = new Main();
		Scanner sc = new Scanner(System.in);
		int input = sc.nextInt();
		List<Integer> number = new ArrayList<Integer>();
		number.add(input);
		int minimum = 1000000;
		for (int i = 1; i <= 1000000; i++) {
			int result = col.returnNumbers(number.get(i - 1));
//			System.out.println("i = "+i +" " +result);
			if (number.contains(result)) {
				minimum = i + 1;
				break;
			}
			number.add(result);
		}
		System.out.print(minimum);

	} main {
		Main col = new Main();
		Scanner sc = new Scanner(System.in);
		int input = sc.nextInt();
		List<Integer> number = new ArrayList<Integer>();
		number.add(input);
		int minimum = 1000000;
		for (int i = 1; i <= 1000000; i++) {
			int result = col.returnNumbers(number.get(i - 1));
//			System.out.println("i = "+i +" " +result);
			if (number.contains(result)) {
				minimum = i + 1;
				break;
			}
			number.add(result);
		}
		System.out.print(minimum);

	} Main col = new Main(); col new Main() Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int input = sc.nextInt(); input sc.nextInt() sc.nextInt sc List<Integer> number = new ArrayList<Integer>(); number new ArrayList<Integer>() number.add(input) number.add number input int minimum = 1000000; minimum 1000000 for (int i = 1; i <= 1000000; i++) {
			int result = col.returnNumbers(number.get(i - 1));
//			System.out.println("i = "+i +" " +result);
			if (number.contains(result)) {
				minimum = i + 1;
				break;
			}
			number.add(result);
		} int i = 1; int i = 1; i 1 i <= 1000000 i 1000000 i++ i++ i {
			int result = col.returnNumbers(number.get(i - 1));
//			System.out.println("i = "+i +" " +result);
			if (number.contains(result)) {
				minimum = i + 1;
				break;
			}
			number.add(result);
		} {
			int result = col.returnNumbers(number.get(i - 1));
//			System.out.println("i = "+i +" " +result);
			if (number.contains(result)) {
				minimum = i + 1;
				break;
			}
			number.add(result);
		} int result = col.returnNumbers(number.get(i - 1)); result col.returnNumbers(number.get(i - 1)) col.returnNumbers col number.get(i - 1) number.get number i - 1 i 1 if (number.contains(result)) {
				minimum = i + 1;
				break;
			} number.contains(result) number.contains number result {
				minimum = i + 1;
				break;
			} minimum = i + 1 minimum i + 1 i 1 break; number.add(result) number.add number result System.out.print(minimum) System.out.print System.out System System.out minimum String args[] args public int returnNumbers(int x) {
		if (x % 2 == 0)
			return x / 2;
		else
			return 3 * x + 1;
	} returnNumbers {
		if (x % 2 == 0)
			return x / 2;
		else
			return 3 * x + 1;
	} if (x % 2 == 0)
			return x / 2;
		else
			return 3 * x + 1; x % 2 == 0 x % 2 x 2 0 return x / 2; x / 2 x 2 return 3 * x + 1; 3 * x + 1 3 * x 3 x 1 int x x
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

class Main {

	public static void main(String args[]) {
		Main col = new Main();
		Scanner sc = new Scanner(System.in);
		int input = sc.nextInt();
		List<Integer> number = new ArrayList<Integer>();
		number.add(input);
		int minimum = 1000000;
		for (int i = 1; i <= 1000000; i++) {
			int result = col.returnNumbers(number.get(i - 1));
//			System.out.println("i = "+i +" " +result);
			if (number.contains(result)) {
				minimum = i + 1;
				break;
			}
			number.add(result);
		}
		System.out.print(minimum);

	}

	public int returnNumbers(int x) {
		if (x % 2 == 0)
			return x / 2;
		else
			return 3 * x + 1;
	}
}
