

import java.util.HashMap;
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
		map.put(s, s);

		int ans = 2;
		while (true) {
			if (s % 2 == 0)
				s = s / 2;
			else
				s = 3 * s + 1;
			if (map.containsKey(s)) {
				break;
			}
			map.put(s, s);
			ans++;
		}

		System.out.println(ans);
	}

} import java.util.HashMap; HashMap java.util import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
		map.put(s, s);

		int ans = 2;
		while (true) {
			if (s % 2 == 0)
				s = s / 2;
			else
				s = 3 * s + 1;
			if (map.containsKey(s)) {
				break;
			}
			map.put(s, s);
			ans++;
		}

		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
		map.put(s, s);

		int ans = 2;
		while (true) {
			if (s % 2 == 0)
				s = s / 2;
			else
				s = 3 * s + 1;
			if (map.containsKey(s)) {
				break;
			}
			map.put(s, s);
			ans++;
		}

		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
		map.put(s, s);

		int ans = 2;
		while (true) {
			if (s % 2 == 0)
				s = s / 2;
			else
				s = 3 * s + 1;
			if (map.containsKey(s)) {
				break;
			}
			map.put(s, s);
			ans++;
		}

		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc HashMap<Integer, Integer> map = new HashMap<Integer, Integer>(); map new HashMap<Integer, Integer>() map.put(s, s) map.put map s s int ans = 2; ans 2 while (true) {
			if (s % 2 == 0)
				s = s / 2;
			else
				s = 3 * s + 1;
			if (map.containsKey(s)) {
				break;
			}
			map.put(s, s);
			ans++;
		} true {
			if (s % 2 == 0)
				s = s / 2;
			else
				s = 3 * s + 1;
			if (map.containsKey(s)) {
				break;
			}
			map.put(s, s);
			ans++;
		} if (s % 2 == 0)
				s = s / 2;
			else
				s = 3 * s + 1; s % 2 == 0 s % 2 s 2 0 s = s / 2 s s / 2 s 2 s = 3 * s + 1 s 3 * s + 1 3 * s 3 s 1 if (map.containsKey(s)) {
				break;
			} map.containsKey(s) map.containsKey map s {
				break;
			} break; map.put(s, s) map.put map s s ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
		map.put(s, s);

		int ans = 2;
		while (true) {
			if (s % 2 == 0)
				s = s / 2;
			else
				s = 3 * s + 1;
			if (map.containsKey(s)) {
				break;
			}
			map.put(s, s);
			ans++;
		}

		System.out.println(ans);
	}

} public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
		map.put(s, s);

		int ans = 2;
		while (true) {
			if (s % 2 == 0)
				s = s / 2;
			else
				s = 3 * s + 1;
			if (map.containsKey(s)) {
				break;
			}
			map.put(s, s);
			ans++;
		}

		System.out.println(ans);
	}

} Main


import java.util.HashMap;
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int s = sc.nextInt();

		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
		map.put(s, s);

		int ans = 2;
		while (true) {
			if (s % 2 == 0)
				s = s / 2;
			else
				s = 3 * s + 1;
			if (map.containsKey(s)) {
				break;
			}
			map.put(s, s);
			ans++;
		}

		System.out.println(ans);
	}

}
