import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

/**
 * メインクラス
 *
 */
public class Main {

	/**
	 * メインメソッド
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {

		// ============================================================
		// 標準入力を変数に設定
		// ============================================================

		// 標準入力を取得
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		long s = Integer.parseInt(br.readLine());

		List<Long> sums = new ArrayList<Long>();

		boolean ok = true;
		long i = 0;
		sums.add(s);
		while (ok) {

			i++;

			s = calc(s, i);

			if (sums.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				sums.add(s);
			}

		}

	}

	static long calc(long num, long i) {

		if (num % 2 == 0) {
			return num / 2;

		} else {
			return num * 3 + 1;
		}

	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util public class Main {

	/**
	 * メインメソッド
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {

		// ============================================================
		// 標準入力を変数に設定
		// ============================================================

		// 標準入力を取得
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		long s = Integer.parseInt(br.readLine());

		List<Long> sums = new ArrayList<Long>();

		boolean ok = true;
		long i = 0;
		sums.add(s);
		while (ok) {

			i++;

			s = calc(s, i);

			if (sums.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				sums.add(s);
			}

		}

	}

	static long calc(long num, long i) {

		if (num % 2 == 0) {
			return num / 2;

		} else {
			return num * 3 + 1;
		}

	}
} Main /**
	 * メインメソッド
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {

		// ============================================================
		// 標準入力を変数に設定
		// ============================================================

		// 標準入力を取得
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		long s = Integer.parseInt(br.readLine());

		List<Long> sums = new ArrayList<Long>();

		boolean ok = true;
		long i = 0;
		sums.add(s);
		while (ok) {

			i++;

			s = calc(s, i);

			if (sums.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				sums.add(s);
			}

		}

	} main {

		// ============================================================
		// 標準入力を変数に設定
		// ============================================================

		// 標準入力を取得
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		long s = Integer.parseInt(br.readLine());

		List<Long> sums = new ArrayList<Long>();

		boolean ok = true;
		long i = 0;
		sums.add(s);
		while (ok) {

			i++;

			s = calc(s, i);

			if (sums.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				sums.add(s);
			}

		}

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) long s = Integer.parseInt(br.readLine()); s Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br List<Long> sums = new ArrayList<Long>(); sums new ArrayList<Long>() boolean ok = true; ok true long i = 0; i 0 sums.add(s) sums.add sums s while (ok) {

			i++;

			s = calc(s, i);

			if (sums.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				sums.add(s);
			}

		} ok {

			i++;

			s = calc(s, i);

			if (sums.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				sums.add(s);
			}

		} i++ i s = calc(s, i) s calc(s, i) calc s i if (sums.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				sums.add(s);
			} sums.contains(s) sums.contains sums s {
				System.out.println(i + 1);
				return;
			} System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 return; {
				sums.add(s);
			} sums.add(s) sums.add sums s String[] args args static long calc(long num, long i) {

		if (num % 2 == 0) {
			return num / 2;

		} else {
			return num * 3 + 1;
		}

	} calc {

		if (num % 2 == 0) {
			return num / 2;

		} else {
			return num * 3 + 1;
		}

	} if (num % 2 == 0) {
			return num / 2;

		} else {
			return num * 3 + 1;
		} num % 2 == 0 num % 2 num 2 0 {
			return num / 2;

		} return num / 2; num / 2 num 2 {
			return num * 3 + 1;
		} return num * 3 + 1; num * 3 + 1 num * 3 num 3 1 long num num long i i public class Main {

	/**
	 * メインメソッド
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {

		// ============================================================
		// 標準入力を変数に設定
		// ============================================================

		// 標準入力を取得
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		long s = Integer.parseInt(br.readLine());

		List<Long> sums = new ArrayList<Long>();

		boolean ok = true;
		long i = 0;
		sums.add(s);
		while (ok) {

			i++;

			s = calc(s, i);

			if (sums.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				sums.add(s);
			}

		}

	}

	static long calc(long num, long i) {

		if (num % 2 == 0) {
			return num / 2;

		} else {
			return num * 3 + 1;
		}

	}
} public class Main {

	/**
	 * メインメソッド
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {

		// ============================================================
		// 標準入力を変数に設定
		// ============================================================

		// 標準入力を取得
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		long s = Integer.parseInt(br.readLine());

		List<Long> sums = new ArrayList<Long>();

		boolean ok = true;
		long i = 0;
		sums.add(s);
		while (ok) {

			i++;

			s = calc(s, i);

			if (sums.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				sums.add(s);
			}

		}

	}

	static long calc(long num, long i) {

		if (num % 2 == 0) {
			return num / 2;

		} else {
			return num * 3 + 1;
		}

	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

/**
 * メインクラス
 *
 */
public class Main {

	/**
	 * メインメソッド
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {

		// ============================================================
		// 標準入力を変数に設定
		// ============================================================

		// 標準入力を取得
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		long s = Integer.parseInt(br.readLine());

		List<Long> sums = new ArrayList<Long>();

		boolean ok = true;
		long i = 0;
		sums.add(s);
		while (ok) {

			i++;

			s = calc(s, i);

			if (sums.contains(s)) {
				System.out.println(i + 1);
				return;
			} else {
				sums.add(s);
			}

		}

	}

	static long calc(long num, long i) {

		if (num % 2 == 0) {
			return num / 2;

		} else {
			return num * 3 + 1;
		}

	}
}