import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = Integer.parseInt(sc.nextLine());

		Main main = new Main();

		System.out.println(main.solve(num));
	}

	public int solve(int num) {
		if (num == 4 || num == 2 || num == 1) {
			return 4;
		}

		int con = 1;
		while (true) {
			if (num % 2 == 0) {
				num = num / 2;
			} else {
				num = num * 3 + 1;
			}
			con++;
			if (num == 1) {
				break;
			}
		}
		return con + 1;
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = Integer.parseInt(sc.nextLine());

		Main main = new Main();

		System.out.println(main.solve(num));
	}

	public int solve(int num) {
		if (num == 4 || num == 2 || num == 1) {
			return 4;
		}

		int con = 1;
		while (true) {
			if (num % 2 == 0) {
				num = num / 2;
			} else {
				num = num * 3 + 1;
			}
			con++;
			if (num == 1) {
				break;
			}
		}
		return con + 1;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = Integer.parseInt(sc.nextLine());

		Main main = new Main();

		System.out.println(main.solve(num));
	} main {
		Scanner sc = new Scanner(System.in);
		int num = Integer.parseInt(sc.nextLine());

		Main main = new Main();

		System.out.println(main.solve(num));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = Integer.parseInt(sc.nextLine()); num Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc Main main = new Main(); main new Main() System.out.println(main.solve(num)) System.out.println System.out System System.out main.solve(num) main.solve main num String[] args args public int solve(int num) {
		if (num == 4 || num == 2 || num == 1) {
			return 4;
		}

		int con = 1;
		while (true) {
			if (num % 2 == 0) {
				num = num / 2;
			} else {
				num = num * 3 + 1;
			}
			con++;
			if (num == 1) {
				break;
			}
		}
		return con + 1;
	} solve {
		if (num == 4 || num == 2 || num == 1) {
			return 4;
		}

		int con = 1;
		while (true) {
			if (num % 2 == 0) {
				num = num / 2;
			} else {
				num = num * 3 + 1;
			}
			con++;
			if (num == 1) {
				break;
			}
		}
		return con + 1;
	} if (num == 4 || num == 2 || num == 1) {
			return 4;
		} num == 4 || num == 2 || num == 1 num == 4 || num == 2 || num == 1 num == 4 num 4 num == 2 num 2 num == 1 num 1 {
			return 4;
		} return 4; 4 int con = 1; con 1 while (true) {
			if (num % 2 == 0) {
				num = num / 2;
			} else {
				num = num * 3 + 1;
			}
			con++;
			if (num == 1) {
				break;
			}
		} true {
			if (num % 2 == 0) {
				num = num / 2;
			} else {
				num = num * 3 + 1;
			}
			con++;
			if (num == 1) {
				break;
			}
		} if (num % 2 == 0) {
				num = num / 2;
			} else {
				num = num * 3 + 1;
			} num % 2 == 0 num % 2 num 2 0 {
				num = num / 2;
			} num = num / 2 num num / 2 num 2 {
				num = num * 3 + 1;
			} num = num * 3 + 1 num num * 3 + 1 num * 3 num 3 1 con++ con if (num == 1) {
				break;
			} num == 1 num 1 {
				break;
			} break; return con + 1; con + 1 con 1 int num num public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = Integer.parseInt(sc.nextLine());

		Main main = new Main();

		System.out.println(main.solve(num));
	}

	public int solve(int num) {
		if (num == 4 || num == 2 || num == 1) {
			return 4;
		}

		int con = 1;
		while (true) {
			if (num % 2 == 0) {
				num = num / 2;
			} else {
				num = num * 3 + 1;
			}
			con++;
			if (num == 1) {
				break;
			}
		}
		return con + 1;
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = Integer.parseInt(sc.nextLine());

		Main main = new Main();

		System.out.println(main.solve(num));
	}

	public int solve(int num) {
		if (num == 4 || num == 2 || num == 1) {
			return 4;
		}

		int con = 1;
		while (true) {
			if (num % 2 == 0) {
				num = num / 2;
			} else {
				num = num * 3 + 1;
			}
			con++;
			if (num == 1) {
				break;
			}
		}
		return con + 1;
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int num = Integer.parseInt(sc.nextLine());

		Main main = new Main();

		System.out.println(main.solve(num));
	}

	public int solve(int num) {
		if (num == 4 || num == 2 || num == 1) {
			return 4;
		}

		int con = 1;
		while (true) {
			if (num % 2 == 0) {
				num = num / 2;
			} else {
				num = num * 3 + 1;
			}
			con++;
			if (num == 1) {
				break;
			}
		}
		return con + 1;
	}
}