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

public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		int s = in.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer> ();
		a.add(s);
		int n = 0;
		boolean flag = true;
		
		while (flag) {
			if (a.get(n) % 2 == 0)
				a.add(a.get(n) / 2);
			else
				a.add(a.get(n) * 3 + 1);
			for (int i = 0; i <= n; i++) {
				if (a.get(n + 1) == a.get(i))
					flag = false;
			}
			n++;
				
		}
		
		System.out.println(n + 1);

	}

} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		int s = in.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer> ();
		a.add(s);
		int n = 0;
		boolean flag = true;
		
		while (flag) {
			if (a.get(n) % 2 == 0)
				a.add(a.get(n) / 2);
			else
				a.add(a.get(n) * 3 + 1);
			for (int i = 0; i <= n; i++) {
				if (a.get(n + 1) == a.get(i))
					flag = false;
			}
			n++;
				
		}
		
		System.out.println(n + 1);

	}

} Main public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		int s = in.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer> ();
		a.add(s);
		int n = 0;
		boolean flag = true;
		
		while (flag) {
			if (a.get(n) % 2 == 0)
				a.add(a.get(n) / 2);
			else
				a.add(a.get(n) * 3 + 1);
			for (int i = 0; i <= n; i++) {
				if (a.get(n + 1) == a.get(i))
					flag = false;
			}
			n++;
				
		}
		
		System.out.println(n + 1);

	} main {
		
		Scanner in = new Scanner(System.in);
		int s = in.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer> ();
		a.add(s);
		int n = 0;
		boolean flag = true;
		
		while (flag) {
			if (a.get(n) % 2 == 0)
				a.add(a.get(n) / 2);
			else
				a.add(a.get(n) * 3 + 1);
			for (int i = 0; i <= n; i++) {
				if (a.get(n + 1) == a.get(i))
					flag = false;
			}
			n++;
				
		}
		
		System.out.println(n + 1);

	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int s = in.nextInt(); s in.nextInt() in.nextInt in ArrayList<Integer> a = new ArrayList<Integer> (); a new ArrayList<Integer> () a.add(s) a.add a s int n = 0; n 0 boolean flag = true; flag true while (flag) {
			if (a.get(n) % 2 == 0)
				a.add(a.get(n) / 2);
			else
				a.add(a.get(n) * 3 + 1);
			for (int i = 0; i <= n; i++) {
				if (a.get(n + 1) == a.get(i))
					flag = false;
			}
			n++;
				
		} flag {
			if (a.get(n) % 2 == 0)
				a.add(a.get(n) / 2);
			else
				a.add(a.get(n) * 3 + 1);
			for (int i = 0; i <= n; i++) {
				if (a.get(n + 1) == a.get(i))
					flag = false;
			}
			n++;
				
		} if (a.get(n) % 2 == 0)
				a.add(a.get(n) / 2);
			else
				a.add(a.get(n) * 3 + 1); a.get(n) % 2 == 0 a.get(n) % 2 a.get(n) a.get a n 2 0 a.add(a.get(n) / 2) a.add a a.get(n) / 2 a.get(n) a.get a n 2 a.add(a.get(n) * 3 + 1) a.add a a.get(n) * 3 + 1 a.get(n) * 3 a.get(n) a.get a n 3 1 for (int i = 0; i <= n; i++) {
				if (a.get(n + 1) == a.get(i))
					flag = false;
			} int i = 0; int i = 0; i 0 i <= n i n i++ i++ i {
				if (a.get(n + 1) == a.get(i))
					flag = false;
			} {
				if (a.get(n + 1) == a.get(i))
					flag = false;
			} if (a.get(n + 1) == a.get(i))
					flag = false; a.get(n + 1) == a.get(i) a.get(n + 1) a.get a n + 1 n 1 a.get(i) a.get a i flag = false flag false n++ n System.out.println(n + 1) System.out.println System.out System System.out n + 1 n 1 String[] args args public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		int s = in.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer> ();
		a.add(s);
		int n = 0;
		boolean flag = true;
		
		while (flag) {
			if (a.get(n) % 2 == 0)
				a.add(a.get(n) / 2);
			else
				a.add(a.get(n) * 3 + 1);
			for (int i = 0; i <= n; i++) {
				if (a.get(n + 1) == a.get(i))
					flag = false;
			}
			n++;
				
		}
		
		System.out.println(n + 1);

	}

} public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		int s = in.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer> ();
		a.add(s);
		int n = 0;
		boolean flag = true;
		
		while (flag) {
			if (a.get(n) % 2 == 0)
				a.add(a.get(n) / 2);
			else
				a.add(a.get(n) * 3 + 1);
			for (int i = 0; i <= n; i++) {
				if (a.get(n + 1) == a.get(i))
					flag = false;
			}
			n++;
				
		}
		
		System.out.println(n + 1);

	}

} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		int s = in.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer> ();
		a.add(s);
		int n = 0;
		boolean flag = true;
		
		while (flag) {
			if (a.get(n) % 2 == 0)
				a.add(a.get(n) / 2);
			else
				a.add(a.get(n) * 3 + 1);
			for (int i = 0; i <= n; i++) {
				if (a.get(n + 1) == a.get(i))
					flag = false;
			}
			n++;
				
		}
		
		System.out.println(n + 1);

	}

}